My woocommerce shop is UK based, selling bulky items to both the UK market and internationally using FedEx.
I use FedEx for international shipping but sometimes an address cannot be shipped to and the customer gets the ‘no shipping available’ message. However, as far as I can tell, Woocommerce STILL allows the customer to place the order in these situations resulting in an order that cannot be fulfilled. Is there a simple setting somewhere that I am missing that says if no shipping is available, don’t let the order be placed?
I did find this resource – https://www.bolderelements.net/support/knowledgebase/removing-checkout-button-shipping-not-available/ but that only removes the ability to get to the checkout page.
It seems like there should be a setting for something this basic?
2
Answers
I ended up solving this by not hiding the button, but by forcing an error if there is no shipping. I'm using the woocommerce_checkout_process action for this:
Hope this helps someone else!
This code wors for me. It hides the "checkout" button on checkout page if there are no available shipping methods. Goes into your child theme’s functions.php.