Skip to main content

Create a Custom Shipping Method in WooCommerce (Flat Rate Shipping)

Learn how to create a custom shipping method in WooCommerce using the Discount Rules and Dynamic Pricing plugin. This complete guide covers setting up a flat rate shipping method, configuring costs, and adding conditions. Offer flexible shipping options that match your store's needs.

📋 Table of Contents


🚀 Why Create Custom Shipping Methods?

Creating custom shipping methods allows you to offer flexible shipping options that match your store's needs. Whether you want to charge a flat rate, offer free shipping based on conditions, or create role-based shipping, custom methods give you full control .

Common Shipping Methods

Shipping MethodDescriptionUse Case
Flat RateCharge a fixed amount per order or per itemMost common for simple shipping costs
Free ShippingOffer complimentary delivery based on conditionsEncourage larger orders or reward customers
Local PickupAllow customers to collect orders in personReduce shipping costs for local customers

Key Statistic: 78% of shoppers are willing to spend more to qualify for free shipping offers.


Step-by-Step: Create a Flat Rate Shipping Method

Best for: Charging a fixed shipping amount for all orders or based on specific conditions. Perfect for stores with consistent shipping costs.

Scenario: Create a flat rate shipping method called "Local Shipping" with a cost of $20.

Step 1: Access Shipping Methods and Choose a Template

  1. In your WordPress admin, go to the Woo Pricing & Discounts menu
  2. Open the Shipping Methods tab
  3. Click on the Add from Template button to quickly start a new rule

Add from Template button - Shipping Methods tab

  1. In the "Choose your desired shipping method" modal, search for templates
  2. Under Standard Shipping, find and select "Flat Rate Shipping Fee"
  3. Click "Add Method"

Flat Rate Shipping Fee template selection

Step 2: Configure the Shipping Method

Flat Rate Shipping configuration

  1. Name: "Local Shipping" (customizable) — This is the title customers see at checkout
  2. Status: Ensure Enable is checked
  3. Apply Mode: Choose how this rule interacts with other shipping methods
    • Apply this rule and disregard other rules — Only this shipping method will be shown
    • Apply with other applicable rules — This method will appear alongside other options
    • Apply if other rules are not applicable — This metthod will appear if other shipping methods are not applicable
  4. Tax Status: Choose Taxable or None
  5. Cost: Enter the base shipping cost (e.g., 20)

Step 3: Configure Additional Fees (Optional)

Customize additional shipping fees based on your needs:

  • Cost Per Quantity: Set a cost for each item in the cart. For example, 2 would add $2 per item
  • Cost Per Weight: Set a cost per weight unit. For example, 1 would add $1 per kg/lbs
  • Fee: Add an additional fixed fee. Use % for percentage-based fees (e.g., 10% for 10% of the cart subtotal)
  • Minimum Fee: Set a minimum fee amount (useful with percentage fees)
  • Maximum Fee: Set a maximum fee amount (useful with percentage fees)

Step 4: Schedule the Shipping Rule (Optional)

By default, the campaign is unscheduled and runs immediately:

Unscheduled shipping rule

For scheduled promotions, under the "Date Time" section to configure:

  • Date Range — Run a promotion over a period (e.g., for a holiday sale)
  • Date Time Range — Precise start and end date/time for limited-time offers
  • Specific Date — Single date activation (e.g., Black Friday)
  • Days — Recurring weekly promotions (e.g., Free Shipping Fridays)
  • Time — Daily time ranges (e.g., flash free shipping)

Schedule for a date period

Use "+ And New Rule" to combine conditions or "+ OR New Group" for alternative schedules.

tip

For a deep dive into timezone setup, recurring schedules, and multi-tier scheduling logic, read our comprehensive Scheduling & Date-Time Guide.

Step 5: Add Conditions (Optional)

Under the Conditions section, you can control when this shipping method appears :

Common Conditions:

  • Subtotal including tax — Show method when cart subtotal meets a threshold
  • Subtotal excluding tax — Show method based on subtotal before tax
  • Number of cart items — Show method based on item count in cart
  • User roles — Show method only for specific user roles (e.g., Wholesale, VIP)
  • Products in cart — Show method when specific products are in the cart
  • Product Categories in cart — Show method when products from specific categories are in the cart
  • And more

Example: To offer this shipping method only for orders over $100, add a "Subtotal including tax" condition with "Greater equal to" set to 100.

tip

For full details on all 14 condition groups, AND/OR logic, and available comparison operators, check out our Complete Rule Conditions Guide.

Step 6: Save and Test

Click Save and test by adding products to your cart.

Flat Rate Shipping full configuration


Result Example

Cart with Flat Rate Shipping Applied

Cart items:

  • Shirt: $20.00
  • Shirt - Green: $25.00

Subtotal: $45.00

Result: The "Local Shipping" method appears with a flat rate of $20.00.

Flat rate shipping applied in cart

Cart display shows:

  • Subtotal: $90.00
  • Shipping method: Local Shipping — $20.00
  • Estimated total: $110.00

Shipping Cost Calculation Options

The plugin offers flexible cost calculation options to match your shipping strategy:

Cost TypeDescriptionExample
Base CostFixed shipping charge per order$20 per order
Cost Per QuantityFee multiplied by item quantity$2 × 5 items = $10
Cost Per WeightFee multiplied by cart weight$1 × 10 kg = $10
Percentage FeePercentage of cart subtotal10% of $100 = $10

Formula for Advanced Calculations

You can combine costs using the following formula:

Total Cost = [Base Cost] + ([Cost Per Quantity] × [Qty]) + ([Cost Per Weight] × [Weight])

🚀 Troubleshooting: Shipping Method Not Showing?

If your shipping method doesn't appear at checkout, follow these steps:

Step 1: Check Your Conditions

  1. If you added conditions, verify they are met by the cart
  2. Test with a cart that clearly meets the conditions
  3. Try removing conditions temporarily to test

Step 2: Check Shipping Zones

  1. Go to WooCommerce > Settings > Shipping > Shipping Zones
  2. Ensure the shipping method is added to the correct zone
  3. Verify the customer's address falls within that zone

Step 3: Check Apply Mode

  1. If Apply Mode is set to "Apply this rule and disregard other rules", ensure no conflicting rules exist
  2. Try switching to "Apply with other applicable rules"

Step 4: Check for Plugin Conflicts

  1. Third-Party Shipping Plugins: Having multiple shipping plugins (e.g., Table Rate Shipping, dynamic rate calculators, or shipping method hide/show rules) active simultaneously can override WooCommerce shipping packages or suppress custom methods. Temporarily deactivate competing shipping and discount plugins to test.
  2. Admin JavaScript Conflicts: If the rule editor fails to load, save, or show dropdowns, check your browser console (F12) for JavaScript errors caused by plugins that inject scripts across all admin pages (such as SkyVerge or analytics plugins).
  3. Caching & Theme: Clear your site cache and test in an incognito browser window. If needed, test with a standard WooCommerce theme (such as Storefront) to rule out theme hook issues.
  4. Learn More: Follow our detailed step-by-step conflict isolation guide in the Complete Troubleshooting Guide.

🎉 Success!

You've learned how to create a custom shipping method in WooCommerce using the Discount Rules and Dynamic Pricing plugin. This powerful feature allows you to:

  • Create flat rate shipping methods with custom names and costs
  • Add conditional logic to control when shipping methods appear
  • Schedule promotions for specific dates or recurring campaigns
  • Offer flexible shipping options that match your store's needs

📚 Next Steps

Now that you've mastered custom shipping methods, explore other powerful ways to use the Shipping Methods features:


🔍 SEO Keywords

Primary Keywords: custom shipping method WooCommerce, flat rate shipping WooCommerce, create shipping method, WooCommerce shipping, shipping method configuration

Secondary Keywords: WooCommerce shipping settings, add shipping method, conditional shipping, shipping cost formula, WooCommerce shipping zones, flat rate shipping cost, Discount Rules and Dynamic Pricing plugin