change wc_add_notice text on line 1101 exactly from class-wc-form-handler.php
-
hi, i need to change the text from:
wc_add_notice (__ (‘Your account was created successfully. Your login details have been sent to your email address.’, ‘woocommerce’));
}on line 1101 exactly from class-wc-form-handler.php
They gave me a code but it doesn’t work, I show them:
<? 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 ‘ENTER YOUR NEW MESSAGE HERE’;
}
return $ notice_message;
}
add_filter (‘woocommerce_add_success’, ‘wcmo_remove_new_registration_notice’, 99, 1);This doesn’t look like a filter, how can I do it?
I managed to edit in the woocomerce template and change the text (https://imgbb.com/L8DPBMW) but I need you to tell me how to do it in functions.php:
I hope you can help me
- The topic ‘change wc_add_notice text on line 1101 exactly from class-wc-form-handler.php’ is closed to new replies.