Code snippet: price adjustment for the specific value of cart order

This  code snippet will help you to offer a price adjustment for the certain value of the order.
Let’s say that you want to offer a price adjustment of 50% for ups ground service when the cart order is above than $40.
Steps to add code snippet:
1.Add the following code to your functions.php or anywhere relevant.
2. Then you need to 40.
3. After that, you need to give the value of the service in the array for which you want the adjustment along with the adjustment value.
Let’s say you want 50% price adjustment for ups ground then you need to type
 ‘wf_shipping_ups:03’ => 0.5
To find the value  of the Service code, navigate to get the value for the service.
The code is as given below:

3 thoughts on “Code snippet: price adjustment for the specific value of cart order”

    1. Hi Michael,

      If you want a 100% price adjustment, then you have to type in “‘wf_shipping_ups:01’ => 1”
      Try this and let us know if you have any query.

    2. Hi Anindo, sorry, “1” does not work.
      $available_shipping_methods[$key]->cost * $shipping_services_with_price[$key]: $available_shipping_methods[$key]->cost *1 = no diffrent.
      At the end shipping should be free when cart oder is above than $90
      Do you have any ideas? Thank you!

Comments are closed.

Scroll to Top