If you want to disable the standard WooCommerce notice that displays when a new user registers an account, you can use the following snippet:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Remove WooCommerce notice when user registers new account | |
*/ | |
function wcmo_remove_new_registration_notice( $notice_message ) { | |
if( strpos( $notice_message, 'Your account was created successfully' ) !== false ) { | |
return ''; | |
} | |
return $notice_message; | |
} | |
add_filter( 'woocommerce_add_success', 'wcmo_remove_new_registration_notice', 99, 1 ); |
This is how to add the snippet.