1. Home
  2. Knowledge Base
  3. WooCommerce Members Only
  4. Registration
  5. Remove WooCommerce notice when user registers new account
  1. Home
  2. Knowledge Base
  3. WooCommerce Members Only
  4. Remove WooCommerce notice when user registers new account

Remove WooCommerce notice when user registers new account

If you want to disable the standard WooCommerce notice that displays when a new user registers an account, you can use the following snippet:

<?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.

Was this article helpful?

Related Articles