Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ara303/1fca86ae5ae52f8ef57402778c7cb19d to your computer and use it in GitHub Desktop.
Save ara303/1fca86ae5ae52f8ef57402778c7cb19d to your computer and use it in GitHub Desktop.
Change the "No shipping available" error message in WooCommerce
function wbsuk_change_no_shipping_error() {
return '<div class="no-shipping-text">Your order cannot be completed automatically. Please <a href="contact">contact us</a> and we will confirm a price to ship to you.</div>';
}
add_filter( 'woocommerce_cart_no_shipping_available_html', 'wbsuk_change_no_shipping_error' );
add_filter( 'woocommerce_no_shipping_available_html', 'wbsuk_change_no_shipping_error' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment