woocommerce offtopic – Remove login fields from /customer-account page
I have a site using WooCommerce and Dokan, and I have set up combined registration form in the customer-account page, some fields from WooCommerce and some from Dokan.
I want to use the /customer-account page as my registration page and then have a seperate login page. My plan was to just adjust the look of the default WordPress login page and maybe use some another URL (change it to ../login)
But my question is: How do I remove the login section fields from the default WooCommerce /customer-account page?
I have tried adding this to functions.php:
// Remove the default WooCommerce login form from the /customer-account page.
remove_action( 'woocommerce_before_checkout_form','woocommerce_checkout_login_form', 10 );
I have also tried this:
// Remove the default WooCommerce login form from the /customer-account page.
add_action( 'woocommerce_before_checkout_form', 'remove_checkout_login_form', 4 );
function remove_checkout_login_form(){
remove_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_login_form', 10 );
}
I have cleared the cache, both the local browser and the entire sites.
Neither works. The login fields are still there.
Any help highly appreciated!
Leave an answer