New answers tagged register
I managed to figure out how to ensure the fields can be updated via edit-account by adding the following action; add_action( 'woocommerce_save_account_details', 'wooc_save_extra_register_fields' ); Now my next challenge, is to add a select field using data from an json file as values. Is this easy to do?
If you are not using a child theme, this mod requires one. Here's how. The answer to your question is on the page you linked, specifically in the last line of code: add_action( 'woocommerce_created_customer', 'some_unique_function_name' ); This runs the function some_unique_function_name() whenever a new user is registered through the woocommerce ...
Here is from my previous project. The function is hooked into the template_redirect action. Inside the function there are 2 conditionals. The first is the the one that will redirect logged in user away from the login page. And the other one is to redirect non logged in user to the login page. // add a redirect for logged out user ...
Top 50 recent answers are included