How to set a shipping cost by item in Woocommerce

11
March 16, 2019, at 03:30 AM

In Woocommerce, when I add multiple products in cart, the shipping only applies to to 1 product. How should I change that to apply the cost to each item?

Like in the following image, the shipping cost for printer is applied but the LCD monitor is not.

How to set a shipping cost by item in Woocommerce?

Answer 1

In the Woocommerce Shipping Settings for "Flat rate" Shipping Method, there is many ways to get dynamic settings based on:

  • Item quantity, using [qty] argument
  • Total item cost, using [cost] argument
  • A fee, using [fee] argument with additional parameters percent, min_fee and max_fee

You can also use +, -, * and / operators and parenthesis.

Here are some example:

  1. [qty]*2 - Cost by item
  2. 4+([qty]*2.5) - Initial cost with an additional cost by item
  3. [fee percentage='10' min_fee='' max_fee='20'] - Percentage fee limited to a max amount
  4. [fee percentage='10' min_fee='4' max_fee=''] - Percentage fee with a minimal cost

Related thread: Set Minimum item cost in Woocommerce Shipping method rates

Advanced shipping cost customizations:

It's possible to customize even more shipping costs using woocommerce_package_rates filter hook.

See all StackOverFlow related threads using woocommerce_package_rates filter hook.

READ ALSO
Show table with conditions from 2 input fields

Show table with conditions from 2 input fields

I'm having problems showing filtered table under 2 conditions from my database table

18
Why I can't change html format to php format

Why I can't change html format to php format

I got admin panel template from Creative TIM and I want to programing it from scratch but I can't write PHP commands inside HTML so I tried change it from dashboardcomponent

16
Find all audio files recursively and play them at random

Find all audio files recursively and play them at random

What would be a method that can find all audio files and play them at random

45
PHP form value results in array

PHP form value results in array

I have a PHP form that once it's filled it sends results back to my email as acsv file

15