How to set a percentage flat rate shipping with a maximum limit in woocommerce

Sometimes you may want to charge shipping as a percentage of the cart subtotal instead of a fixed fee. But you also want to ensure customers don’t overpay, so you can set a maximum limit.

For example:

  • 10% of the cart subtotal, but no more than $20.

Why use percentage-based shipping with a maximum limit?

  • Fair pricing: Small orders pay lower shipping, and large orders are capped at a reasonable cost.
  • Customer-friendly: Prevents overcharging on bulk orders.
  • Flexible promotions: Combine with discounts or free shipping for high-value carts.
  • Professional setup: Looks transparent and trustworthy at checkout.

Configuration steps

1. Add a new shipping method

  • Go to Dashboard → Dotstore → Flat Rate Shipping (Dotstore).
  • Click Add New Shipping Method.
  • Name it something like “10% Shipping with Max Cap”.

2. Add an advanced fee formula

  • In the shipping method settings, locate the charge field.
  • Enter the advanced parameter for the percentage fee with a maximum limit:

Set up the shipping method charges by percentage

Explanation:

  • percent=10 → charges 10% of cart subtotal.
  • max_fee=20 → maximum fee capped at $20.

3. Save and test

  • Click Save Changes.
  • Go to your store and add items to the cart.
  • The shipping fee will be calculated automatically.

    Shipping charge with actual amount:

    shipping charge with regular price at checkout

Shipping charge stopped at max cap:

shipping charge applied with max cap


Two real examples

Example 1: Cart subtotal $100

  • Rule: [fee percent=10 max_fee=20]
  • 10% of $100 = $10 → Applied shipping = $10

Example 2: Cart subtotal $500

  • Rule: [fee percent=10 max_fee=20]
  • 10% of $500 = $50, but max cap = $20 → Applied shipping = $20

Expected outcome

WooCommerce will calculate shipping as a percentage of the cart subtotal, but never exceed the maximum fee you set. This gives customers fair shipping rates while ensuring you don’t lose money on small orders.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.