Per Product Shipping

Per Product Shipping is a premium extension that allows you to define different shipping costs for products, based on customer location. These shipping costs can be added to other shipping methods, or used as a standalone shipping method.

Installation

↑ Back to top
  1. Download the extension from your WooCommerce dashboard.
  2. Go to Plugins > Add New > Upload and select the ZIP file you just downloaded.
  3. Click Install Now, and then Activate.

How Per-Product Shipping Can Be Used

↑ Back to top

Per-Product Shipping can be used in two ways:

  • Legacy rate adjustment: On eligible legacy setups, per-product costs can be added to other shipping method rates. The Adjust Shipping Costs option appears when no Per-product shipping-zone method is enabled. Check the legacy setup before relying on this option.
  • Standalone Method: In this scenario the ‘per-product shipping’ is the default shipping method. In this case, all product costs are added together to form a single rate.
    • For the per-product package, other methods are restricted by default. Free Shipping and Local Pickup can remain available unless excluded in the method settings.

Setup and Configuration

↑ Back to top

Setup follows this order:

  1. Go to WooCommerce > Settings > Shipping and select the shipping zone you want to add Per-Product Shipping to. Then, click “Add shipping method” and add Per-Product as a shipping method. This is required for the Standalone Method so that Per-Product Shipping will be displayed as a shipping method at checkout.
  2. Go to Products and select a product on which to enable per-product shipping.
  3. Define shipping costs for products and variations as explained in the next sections.
  4. Save the product, then test the shipping options for a customer address in the configured zone.

Defining Shipping Costs for products

↑ Back to top

Enable Per-product shipping on the product

↑ Back to top

To add product-specific rules, open the product’s Product data > Shipping tab and select Enable per-product shipping cost. A default product cost configured on the shipping method can also apply to products without a matching rule.

Adjust Shipping Costs for legacy setups

↑ Back to top

On legacy setups, the Adjust Shipping Costs checkbox can appear above the rate table. This option isn’t shown when an enabled Per-product method is configured in a shipping zone.

If the Adjust Shipping Costs box is checked, the costs entered in the rate table will be added to the shipping costs that are calculated by other shipping methods (excluding Free Shipping). If you want to add a product-specific fee, this box should be checked.

Add rates to the table

↑ Back to top

The table is where you define your product-specific rates. Click the Insert row button to add a new line. Asterisks * can be used as ‘wildcards’ in the location fields.

  • Country Code – Use the 2-letter abbreviation, e.g. US or GB
  • State/County Code – Use the state or county code, e.g. AL or NY for US states
  • Zip/Postal Code – Enter a specific postcode (e.g. 90210) or use a wildcard to match all postcodes in that range (e.g. PE*)
  • Line Cost – Enter a cost which is applied to the line (ignores quantity). This cost should exclude tax.
  • Item Cost – Enter a cost which is applied to the item (cost * quantity). This cost should exclude tax.

You may add as many rows as you need. Only one row will match the customer location, searching top-to-bottom. Rows can be rearranged by clicking and dragging the sort icon (3 horizontal lines) on the left side of the row.

Importing / Exporting

↑ Back to top

The import/export buttons can be found in the bottom-right corner of the rate table.

The Export CSV button will export the product rates into a CSV file containing the following columns:

  • Product ID
  • Country Code
  • State Code
  • Postcode
  • Line cost
  • Item cost

For information on importing CSVs, see Importing Rates via CSV. This is useful if importing similar rates for all products.

Defining Shipping Costs for Variations

↑ Back to top

Each variation can have the same per product shipping options. To enable these costs, go to the Variations tab and Expand. Tick the Per-variation shipping box pictured below:

After doing that, the same per product shipping rule table will appear.

Note: A matching variation rate overrides the product rate. If no variation rule matches, the product’s matching rate applies.

Using as a Standalone Method

↑ Back to top

Per-product shipping can be used as a standalone method whereby all product costs are added together to offer a single rate. When using this method, other methods are restricted for the per-product package by default; Free Shipping and Local Pickup may still be offered unless they are ignored in the method settings.

To enable, go to: WooCommerce > Settings > Shipping > Shipping Zones.

Add the Per-Product Shipping method to a zone. Once you have added the method you can then enter the configuration.

The following options are available:

  • Method Title – When standalone, this is the name of this shipping method shown to the customer.
  • Tax Status – Whether or not taxes should be added to this method.
  • Default Product Cost – Applies per item when no product-specific rule matches. A value here can apply the method to all shippable products in the zone; leave it blank to use product-specific rules only.
  • Handling Fee (per product) – Either fixed or percentage, this fee is added to each and every product in the cart.
  • Handling Fee (per order) – Either fixed or percentage, this fee is applied once to the cart as a whole.
  • Ignore Free Shipping – Check this box to prevent the “Free Shipping” option from appearing for packages in the same zone as this “Per Product” method.
  • Ignore Local Pickup – Check this box to prevent the “Local Pickup” option from appearing for packages in the same zone as this “Per Product” method.

Save changes.

To offer Flat Rate alongside standalone Per Product Shipping for the same package, ask a developer to add a customization.

Importing Rates via CSV

↑ Back to top

Note: Before uploading rates to a different product from which they were exported, please edit your export file to change the product ID column to be the new product’s ID.

To import rates via a CSV file, you can either go to Tools > Import > Per Product Shipping Rates, or you can click either of the import buttons beneath a rate table:

Import CSV (override) deletes the current product’s existing shipping rules, then imports rows for the product IDs in the file. Export or back up the rules first, and make sure the file uses the intended product IDs. Import CSV appends imported rows to the existing rules.

Once on the import screen, upload your CSV file:

Formatting your CSV file

↑ Back to top

Your CSV needs to have a set number of columns (6 in total) that include the following:

  • Product ID: The product the rate applies to, such as 30.
  • Country Code: A two-letter country code, such as US.
  • State Code: A state code, such as AL, if applicable.
  • Postcode: A specific postcode or wildcard, such as 350*.
  • Line Cost: The cost for each line item, such as 9.99.
  • Item Cost: The cost for each individual item, such as 2.99.

Note: Without these columns, the import will fail.

Bulk-enable the Per Product Shipping Setting

↑ Back to top

While the method above can be used to bulk import Per Product Shipping Rates, the same method doesn’t support turning the Per Product Shipping Setting on or off. However, this can be achieved via WooCommerce’s built-in product CSV Importer and Exporter.

The following example illustrates the columns with which the Per Product Shipping or Per Variation Shipping options can be turned on or off when updating products via the built-in CSV importer.

In the example, the target products are a simple product named Hoodie, and a variable product named T-shirt with S, M, and L variations. They already exist in the store and are identified by the number in the ID column (which is unique to each product and site, and should be changed to match the site you’re working on):

In this example, the Meta: _per_product_shipping column is yes and the Meta: _per_product_shipping_add_to_all column is no for the simple product and each variation. Both columns are blank for the variable parent product.

  • ID 2363: simple product, Hoodie
  • ID 2367: variable product, T-shirt
  • ID 2368: variation, T-shirt L
  • ID 2369: variation, T-shirt M
  • ID 2370: variation, T-shirt S

Edit the exported CSV to match your product IDs and the example above, then follow the instructions in the Update Existing Products section of the doc.

After the import completes, the setting is enabled or disabled according to the values in the CSV. Enabled settings appear as pictured in the Defining Shipping Costs for products and Defining Shipping Costs for Variations sections respectively.

Questions and support

↑ Back to top

Something missing from this documentation? Still have questions and need assistance?

  • If you have a question about an extension or theme you’d like to purchase, visit our contact page and use the AI Assistant or contact options.
  • If you already purchased this product and need some assistance, get in touch with a Happiness Engineer via our support page and select this product’s name from the Product dropdown.

Related Products

Advanced, flexible shipping. Define multiple shipping rates based on location, price, weight, shipping class...

Use conditional logic to restrict the shipping and payment options available on your store.

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.