Associate multiple email addresses with the same user account, so they can log in with either

If you create them programmatically, you could set it up so that all of the usernames are one type of email address (business or personal) and the WP email address field contains the other type. It’s not clear if this would fit your particular use case, but one other login possibility is to integrate single … Read more

Woocommerce check if email already created order recently [closed]

You can create a helper function for that which qurries the orders for given email and created less than 10 mins ago. function wpse407278_check_if_ordered_in_last_10_mins( $email ) { if ( !isset($email) || empty($email) ) { return false; } $args = array( ‘customer’ => $email, ‘date_created’ => ‘>’ . ( time() – strtotime(‘-10 minutes’) ), ); $orders … Read more

How do you create two separate Register pages?

Basically all you need to do is add an hidden field named role and set the value to whatever role you want on the register form. add_action(‘register_form’,’show_role_field’); function show_role_field(){ ?> <input id=”role” type=”hidden” tabindex=”20″ size=”25″ value= “<?php if (isset($_GET[‘role’])){echo $_GET[‘role’];} ?>” name=”role”/> <?php } Next thing is to register that role when the user has … Read more