Created
November 5, 2020 09:47
-
-
Save plugin-republic/a7a474777c8a9627d566af0c658f6593 to your computer and use it in GitHub Desktop.
Remove WooCommerce notice when user registers new account
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 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment