Separate Woocommerce Login and Registration Forms
-
I created separate login form and registration form templates in a woocommerce folder placed in my child theme folder.
Then I included a link to registration form in the login template
/
Register
/And defined a function load registration theme in functions.php:
/
add_action(‘woocommerce_before_my_account’,’load_signup_form’, 2);
function load_signup_form(){
if ( isset( $_GET[‘action’]) && $_GET[‘action’] == “register”){
woocommerce_get_template( ‘myaccount/form-register.php’ );
}
}
/The link to the registration form leads to a 404 error though. I thought I’d used the wrong hook so I replaced the above function with the following:
/
add_action(‘woocommerce_before_customer_login_form’,’load_signup_form’, 2);
function load_signup_form(){
if ( isset( $_GET[‘action’]) && $_GET[‘action’] == “register”){
woocommerce_get_template( ‘myaccount/form-register.php’ );
}
}
/The problem persists.
Someone please help.
- The topic ‘Separate Woocommerce Login and Registration Forms’ is closed to new replies.