I\'m trying to figure out where WooCommerce creates it\'s messages for when there is a success, error or notice in WooCommerce. I want to edit those messages to fit the scenario
Open the plugin files and search for wc_add_notice
:
This function has a filter:
apply_filters( 'woocommerce_add_' . $notice_type, $message );
The $notice_type
is the second argument passed in all those occurrences.
Using something like this should work:
add_filter( 'woocommerce_add_error', function( $message ) {
if( $message == 'Some message' )
$message = '';
return $message;
});