Snippet to configure a minimum shipping amount for UPS

The below code snippet is used to configure minimum shipping amount for UPS services.

In the above snippet, the user has to set the minimum value in this variable :
$min_shipping_rate = 10;
Here, a minimum value of 10 is set.

So, for any service, if UPS API returns any value less than 10, then the snippet overrides this and shows a value of 10 in the cart as shown in screenshot below :

Before incorporating snippet:

Cart Without Snippet

Cart Without Snippet

After incorporating snippet :

Cart with Snippet

Cart with Snippet

Leave a Reply