Support » Plugin: WooCommerce » Shipping Zone/Regions – receiving wrong error message

  • Resolved essjay88

    (@essjay88)


    Hi, I have set up WC General Options to sell to all countries, but ship only to the UK (my client is a Florist). Within Shipping Zones I have set up one free delivery method with a number of postcodes listed under the Zone regions (my client can only deliver to Shipping Addresses within 20 miles of her premises). When someone enters a postcode that is not included in those listed under Zone regions they see one or both of these error messages:

    1. At the top of the page “No shipping method has been selected. Please double check your address, or contact us if you need any help.”
    2. At the bottom of the page in the ‘Your Order’ area “Shipping costs will be calculated once you have provided your address.”

    Surely the appropriate error message is “Sorry, we do not ship to your postcode” or something similar?

    A product URL: http://hillviewflowers.co.uk/product/seasonal-plant/

    Thanks, Sarah

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hey,

    There is no text like “Sorry, we do not ship to your postcode” in WooCommerce, sorry.

    Try the plugin “Say What”, which lets you change the text shown.
    https://wordpress.org/plugins/say-what/

    Or just put some code to your theme functions.php

    
    add_filter( 'woocommerce_no_shipping_available_html', 'my_custom_no_shipping_message' );
    add_filter( 'woocommerce_cart_no_shipping_available_html', 'my_custom_no_shipping_message' );
    function my_custom_no_shipping_message( $message ) {
    	return __( 'Here type your message' );
    
    Thread Starter essjay88

    (@essjay88)

    Thank you both; first I installed the ‘Say What?’ plugin suggested by @ospiotr but was having trouble finding the correct WooCommerce folder to identify the correct .php string and text domain. Then @jablonowski came in with some code which would be a much easier way for me to achieve results I think, but adding the .php code to my child theme functions.php resulted in a 505 error message. Perhaps this code needs to go direct into the WooCommerce functions.php file? I am not very confident using .php so forgive the question!

    Sorry i miss “}” at the end 🙂

    try that

    
    add_filter( 'woocommerce_no_shipping_available_html', 'my_custom_no_shipping_message' );
    add_filter( 'woocommerce_cart_no_shipping_available_html', 'my_custom_no_shipping_message' );
    function my_custom_no_shipping_message( $message ) {
    	return __( 'Here type your message' );
    }
    
    Thread Starter essjay88

    (@essjay88)

    Thank you Piotr, I really appreciate your help but now I am using ‘My Custom Functions’ plugin to make adding the code easier (for me) and with the addition of } it still creates a “fatal error”. However the plugin does not tell me which fatal error 🙂

    Thread Starter essjay88

    (@essjay88)

    NO WAIT! Piotr it has worked! Thank you so much 🙂

    Great, good luck 😉

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Shipping Zone/Regions – receiving wrong error message’ is closed to new replies.