Created
October 27, 2018 13:03
-
-
Save codeagencybe/8b3a78f54b27a8a03bd35f2a67c74386 to your computer and use it in GitHub Desktop.
Woocommerce change message when no delivery method is available
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_filter( 'woocommerce_cart_no_shipping_available_html', 'ca_message_no_available_shipping_methods', 10, 1 ); | |
| add_filter( 'woocommerce_no_shipping_available_html', 'ca_message_no_available_shipping_methods', 10, 1 ); | |
| function ca_message_no_available_shipping_methods( $default_msg ) { | |
| $custom_msg = "Unfortunately, our delivery service is available in your location"; | |
| if( empty( $custom_msg ) ) { | |
| return $default_msg; | |
| } | |
| return $custom_msg; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment