I managed to modify one error message with the help of a plugin named WooCommerce No Shipping Message

Link: https://wordpress.org/plugins/wc-no-shipping-message/

Now, I want to modify top error message of my checkout page from this.

No shipping method has been selected. Please double check your address, or contact us if you need any help.

enter image description here


Not available for shipping to the selected destination.
Helpline (+61) 02-3345-5555

Website Link: https://www.staging.millionroses.com.au/

Please someone help me to do that, i am not able to find any solution for this. Thank you!


this can be done with the following code (untested):

add_filter( 'woocommerce_add_error', 'prefix_woocommerce_edit_errors' );
function prefix_woocommerce_edit_errors( $error ) {
    if( 'The generic error message' === $error ) {
        $error = 'The shiny brand new error message';
    return $error;
  • Not working, no effect from this code. I added in function.php of my child theme. – Brajmohan Kumar Dec 1 '19 at 9:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.