Questions tagged [usermetadata]
The usermetadata tag has no usage guidance.
42
questions
1
vote
1
answer
35
views
Filter WooCommerce available payment gateways based on user metadata
I'm encountering a problem with a custom function in WooCommerce that filters payment gateways based on user meta. The function is intended to show specific gateways according to the ...
1
vote
2
answers
67
views
Add custom fields to WooCommerce Reset Password form and save data
How I can add custom fields into WooCommerce reset password form?
Because on the register client I need to get email verify and setup they own account password, and also I want to let them set up ...
1
vote
1
answer
65
views
Wordpress: Add a custom radio input field to user profile
I have this code to add a custom field to user profile.
It works fine but it is only useful for 'text' input type.
I need to add a 'radio' input type. I need help with the code.
/**********************...
1
vote
1
answer
107
views
Wordpress update user meta when the user submits form (form called with do_shortcode)
I want to update user meta after the user submits a form. function updateUserType(){update_user_meta works as expected alone, however it does not work when the form is called with do_shortcode.
echo ...
0
votes
1
answer
59
views
Add ACF user data to Woocommerce Orders as metadata
For local delivery we've added routenumbers and -locations to our users, so we can calculate the best route for local delivery. In Woocommerce and we're using Advanced Order Export Pro to create an ...
1
vote
1
answer
69
views
How to delete WordPress users with links in their profile description or other profile fields?
I have a lot of spam profiles on my WordPress website. They're linking to their spam sites using their profiles (homepage and description).
That is a good method to recognize them. Normal users don't ...
1
vote
1
answer
131
views
Disable Tax Calculation for specific user role(s) in WooCommerce
I have two different user roles. Chef and Customer. For Chef I want to add the Tax, but for Customer I don't want to add the Tax. Problem is, for Chef, there is no issue in adding Tax as WooCommerce ...
1
vote
1
answer
169
views
Updating user custom metadata from WooCommerce order status change
I'm pretty new at coding and I have difficulties finding out why my code does not work properly.
In WordPress/Woocommerce, I want to check if the customer has bought a product (box subscription), and ...
0
votes
0
answers
56
views
Adding Feature for 15% Discount on First 3 Trips in WooCommerce
How to modify my existing code to achieve the following:
Apply a 15% discount only for the first 3 instances of a specific product (ID: 848) for each logged-in user.
add_action('...
1
vote
1
answer
86
views
Make registration field usermeta value unique for each user in WooCommerce
I'm trying to validate the Company Name field for a unique value for each user in the WooCommerce registration form, but I'm having trouble:
// That's what I got, but it doesn't work...
add_action( '...
0
votes
0
answers
191
views
WooCommerce in WordPress: add custom user meta data to order meta data on order completion (user should not see it)
I have taken a couple of programming courses, but am not a programmer. 9 times out of 10, I can figure out how to modify code to suit my purposes. This time... I'm stuck.
I would like to add the user'...
0
votes
1
answer
50
views
Wordpress User Meta Array Merge
I have created a new user meta data called 'hca_recent'. I am pulling the data from an ajax call and adding it as an array to the meta data.
$hca_recent_array = array(
'recent_count' => $...
0
votes
0
answers
36
views
Update User ACF information
I have applied a code to create a new user using an elementor pro form, this included a variety of meta data achieved through using ACF fields. However, I am now trying to allow users update these ACF ...
0
votes
0
answers
35
views
How to avoid jumping up on woocommerce registration, to ajaxify the form or some other way?
The registration form by default is jumping up if user makes the error and shows the error only in one field, even if all required fields are empty. It's annoying.
I have many extra-fields in this ...
2
votes
1
answer
185
views
Change user role based on custom user metadata value in WooCommerce
I use a wallet system on my website, how can I change the user's role if his balance has dropped below 0? The meta_value can take a value from -500 to 0.
add_action('init', 'changerole');
function ...