'Woocommerce: Prevent checkout if shipping cost is below certain value
I have an issue with my current shipping plugin (UPS) that lets customers checkout, even if no service is available. The issue is that "UPS Shipping" still gets selected as shipping method but it has no cost, therefor the customer pays no shipping cost (and mostly we can't actually ship to them). So I cannot prevent checkout due to no shipping method selected (I found solutions for this issue).
Is there a way to conditionally throw an error (preferred) or simply prevent Checkout (hide button) when the shipping cost is below a certain value, like €0.1 or something? No "real" shipping method of mine is cheaper than €4,99 so this could be a way to prevent checkout. Thanks for any help!
I tried the solution from here: Hide Place Order button when no shipping options are available but the issue remains that "UPS Shipping" is still selected as shipping method, it just calculates no shipping cost and/or cannot ship actually. I have found no way to make this conditional NOT to shipping method but to shipping cost.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
