Ignore the flat rates returned by Stamps which are less in size than the package requested

The following code snippet will ignore the rates returned by Stamps which are less in size than the package requested in API.

Kindly copy this snippet into Appearance –> Editor –> functions.php of your WordPress theme

For instance if you have selected a box of dimensions 9x9x9 for packing your items. Now, Stamps will return all flat rates irrespective of the size requested. That means, it will return flat rates for box sizes greater than 9x9x9 as well rates for box sizes less than 9x9x9.

This code snippet will select the most appropriate flat rate box and display the rate at the cart page.

So you do not need to worry if the rates are coming same for all services. Just include the code snippet and the snippet will select the appropriate flat rate.

Note : Before using this snippet, please update the Stamps plugin with the latest version (1.5.4).

Leave a Reply