Disable Automatic Login After WooCommerce Registration

Prevent automatic user login after WooCommerce registration using woocommerce_registration_auth_new_customer filter returning false. Stop default behavior where new users immediately logged in after registration, enable manual user approval workflow before account access, implement user verification processes requiring admin approval, support moderated registration for membership sites or exclusive stores, allow account activation via email confirmation before login, prevent unauthorized access to newly created accounts, perfect for sites requiring manual verification, background checks, or payment confirmation before granting access, and provide control over user authentication timing with single line filter implementation.

Disable Automatic Login After Registration

Woocommerce Woocommerce Hooks Wordpress

Disable Automatic Login After Registration Tutorial/Guide

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

๐Ÿ’ก Have a Coding Problem?

Search our archives or reach out to our team for solutions and expert advice.