Disable Automatic Login After Registration

When we enable customer registration on My Account page, We will know that when new user is register it’s automatically logged in .
it need to change when we need to manually approve each user.

In that case we have to stop this Programmatically.
we can simply use 'woocommerce_registration_auth_new_customer' filter for that.

 

add_filter( 'woocommerce_registration_auth_new_customer', '__return_false' );

 

Enjoy

Categories

Related Blogs

How to add custom style and script in wordpress

`wp_enqueue_scripts` is a crucial action hook in WordPress that allows you to enqueue or register scripts and stylesheets properly. It is commonly used by theme and plugin developers to load necessary CSS and JavaScript files onto the front-end of a WordPress website.

Request A Quote