my website users register with phone number OTP. That's why they have no email address in their accounts. Today I need email address in user accounts. I use this code to add email address for new user registrations. add_action("user_register", function ($user_id) { $user = get_userdata($user_id); if (empty($user->data->user_email)) { $args = array( "ID" => $user->id, "user_email" => uniqid() . "@example.com", ); wp_update_user( $args ); } }); add_filter( 'bnfw_trigger_insert_post', '__return_true' ); But I have about 3000 users that need email address in …
1 - I have a CPT, with 10 posts. 2 - I have 10 users Q : How can i assign a single post from my CPT, to an unique user ? -> Each user must see only it's assigned post (Each post will be assigned by the admin of the site) Thanks
website administrator can login using woocommerce my-account page. is there any way to prevent this and change the login page for admin? I mean the admin username, email and password will be acceptable only in my custom login page.
As a WordPress newbie I am trying to create a plugin, which will force users to specify their city and gender while registering and then display a personal profile page for each user showing this information. I have checked in my plugin in GitHub: wp-city-gender.php. For the registration part I have followed the Customizing the Registration Form doc and it seems to work fine - the additional city and gender fields are displayed in the registration form and stored later …
I've added the following function to change the order and translate my Woocommerce account navigation. It works perfectly, except for the edit-address/billing part: function wpb_woo_my_account_order() { $myorder = array( 'dashboard' => __('Dashboard', 'woocommerce'), 'wishlist' => __('Wishlist', 'woocommerce'), 'edit-address/billing' => __('Billing details', 'woocommerce'), 'edit-account' => __('Account details', 'woocommerce'), 'customer-logout' => __('Logout', 'woocommerce'), ); return $myorder; } add_filter('woocommerce_account_menu_items', 'wpb_woo_my_account_order'); When I go to my account and click on Billing details in the navigation, I get a page not found URL error. The …
I have searched google and this site and can't seem to find an answer. I would like to be able to add multiple logins for an account. Meaning one account could have several emails and passwords associated with it. If a person logs in with a sub account they would see the same thing as the main account. I will eventually build a way to manage these accounts but first I'm just trying to figure out how to get multiple …
Is there a way to not show the points while you are typing the password but show the letters/numbers of the password? I would like to implement it in my "My account" page of woocommerce:
I have been trying over and over but have come up empty handed. I have followed this tutorial (https://www.atomicsmash.co.uk/blog/customising-the-woocommerce-my-account-section/) to create a new php page for 'My accounts' menu. for some reason it will not link to the new endpoint and constantly revert to dashboard... here is the code I have added to my themes function.php file; /** * Register new endpoints to use inside My Account page. */ add_action( 'init', 'my_account_new_endpoints' ); function my_account_new_endpoints() { add_rewrite_endpoint( 'earnings', EP_ROOT | …
Our client has an existing website which runs on wordpress. They want a separate module which will be made by us. This module won't be made as a Wordpress plugin and will therefore be hosted on a different server. The WP user can see this module after he is logged in. To see the module it will be loaded by an IFrame. Is it possible to use the WP account of the user to authenticate on this module (for example …
I copied (and customised) the following code which I found online into my functions.php. It has allowed me to add an extra menu item to my WooCommernce account area menu. I now need to add a second menu item and I am not sure how to do this. Does anyone have any advice? /*My account menu item*/ add_filter ( 'woocommerce_account_menu_items', 'misha_one_more_link' ); function misha_one_more_link( $menu_links ){ // we will hook "anyuniquetext123" later $new = array( 'anyuniquetext123' => 'Tour itineraries' ); …
I have defined login levels for users registered on my site as Level 1 and Level 2. I have added a column for same in admin panel users page (users.php), I'm trying to add sorting option but on click for sorting not working. The meta key is level. Here's what I tried. add_filter( 'manage_users_columns', 'myplugin_manage_users_columns'); function myplugin_manage_users_columns( $columns ) { $columns['login_level'] = 'Login Level'; return $columns; } add_filter('manage_users_custom_column', 'myplugin_manage_users_custom_column', 10, 3); function myplugin_manage_users_custom_column( $value, $column_name, $user_id ) { $user = …
I have a constant issue where my login credentials are not found when trying to enter WordPress.org. Password reset option is not possible as my username and email address is not found. Yet, I am still able to access WooCommerce, that utilizes the same login credentials - as it is required to create the WooCommerce account. This is a progressive and long time issue that I have had to resolve over and over again by creating a new WordPress account. …
The idea is to get rid of mandatory new account activation through email As is: register new user -> exit without following to email verification link -> try to log in -> Site says something like: "Your account has to be activated before you can login. You can resend email with verification link by clicking here." Desired to be: register new user -> exit without following to email verification link -> try to log in -> Site let you in. …
I need to show a site notice / elementor pop up (ideally render a shortcode) to specific users based on what User Meta they have. To be more specific, the user needs to activate their account (link sent via email) after registering. However, even if they don't click on the activation link they still have access to their account. I want this notice to appear with something like "Please activate your account" at the top of the window. The User …
I have this function but the function name is "user_profile_update_errors". so it does not work without press "Edit" button in user edit page. Which should I use function for it? access levels are deleted if the date entered is greater than today's date. add_action( 'user_profile_update_errors', 'crf_user_profile_update_errors', 10, 3 ); function crf_user_profile_update_errors($errors, $update, $user ) { $current_date = date("Y-m-d"); $date_to_compare = $_POST['year_of_birth']; if ( ! $update ) { return; } //Bugünün Tarihi// //Girilen Tarih// if (strtotime($current_date > strtotime($date_to_compare)) ) { $user_levels …
I'm creating a short code that shows both first and last name of the user if he's logged in, or, if he's logged in, but hasn't configured any name, it will return a random name with a message telling him to edit his profile. I'm succeeding into getting the names, but not into showing the text that should appear in case the user has no name. The code: // Show name if logged in - PT e ENG function colaborador_nome($atts) …
With WooCommerce, if an email is already associated with an account and the "create account" checkbox is ticked on the checkout page, WooCommerce will require the customer to login to his account before processing the payment. It makes sense but it clearly hinders transformation rate. I'd rather have the customer complete the transaction and transparently associate the order with the email's matching account. However, I have no clue how I could alter the default behaviour to make this possible. Any …
We are two managers for one website , each of us have an AdSense account Can our ad code display in the articles we write, based on the author slug or id? I tried to use this code in head section , but it did not work : <?php if (is_author('author 1');) : ?> <script data-ad-client="ca-pub-ءءءءء1ءءءء" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>; <?php else : ?> <script data-ad-client="ca-pub-ءءءءء2ءءءء" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <?php endif; ?> any ideas to switch automatically between the accounts, not as a …
We have a newsletter signup on our site. When someone signs up, wordpress creates a subscriber account associated with their email address (no password needed). If one of these users then goes to purchase products from us using the same email address, and they tick the box for "create an account" on the checkout page, they get this error: An account is already registered with your email address. Please log in. But they can't log in because their original subscriber …
I am trying to get a specific meta value from all of a customer's orders and simply echo them to the Downloads page within My Account. This is what I have so far, but unable to get $skey to retrieve and display the assigned values that are set from the backend. Basic idea is to go to a customer's order, define what we need for said order in the s_key custom field and just have that populate for customers just …