Skip to content

Instantly share code, notes, and snippets.

@WooForce
Created April 6, 2016 09:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save WooForce/38c956806dee1936f710fe4902709358 to your computer and use it in GitHub Desktop.
Save WooForce/38c956806dee1936f710fe4902709358 to your computer and use it in GitHub Desktop.
Change the default "no available shipping methods" message on cart/checkout page
add_filter( 'woocommerce_cart_no_shipping_available_html', 'change_msg_no_available_shipping_methods', 10, 1 );
add_filter( 'woocommerce_no_shipping_available_html', 'change_msg_no_available_shipping_methods', 10, 1 );
function change_msg_no_available_shipping_methods( $default_msg ) {
$custom_msg = "Call us for quotation - 1-800-XXX-XXXX";
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