How change "no available shipping methods" message in woocommerce : WordPress

Hello Friends,
I hope you are you doing well.
I am here again going to share some useful knowledge regarding to woocommerce shipping information.
If you want to change “No Shipping Method Available” then you will need no need to edit in plugin core files. Just add given below code into your theme function files and set your own custom message that you want to publish on shipping section.
 

add_filter( 'woocommerce_no_shipping_available_html', 'my_custom_no_shipping_message' );
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 __( 'A minimum of 6 products is required. Add more products to complete your purchase' );
}

 
Enjoy Code!

Leave a Reply

Your email address will not be published. Required fields are marked *