[WooCommerce] How do I Define Measurements for Shipping Rates?

Shipping Methods - especially integrated API-based shipping methods - require that your products have set values for dimensions and weights.

These units of measurement are defined for your WooCommerce Products in  WP-Admin > WooCommerce > Settings > Products >> General.  You can learn more about adding shipping dimensions to WooCommerce Products here.

QPilot synchronizes your WooCommerce Product Data including each product's weight and dimensions.  In this help doc, we'll cover how units of measurement are managed within your QPilot Site and how they can be used as conditions for Autoship Cloud Shipping Rates.

For more details and help setting up measurements, please see here: QPilot Units of Measurement

Defining Units of Measurement in Autoship Cloud Shipping Rates

You can define the unit of measurement when adding a Weight Restriction to an Autoship Cloud Shipping Rate.  This means that if you are defining either of Min Weight of Max Weight, you can define a unit of measurement for the value of Weight that you enter.

If no Unit of Weight is selected, the default unit of measurement in your QPilot Site will apply.

Units of Measurement for WooCommerce Products

When your WooCommerce Product Data is synchronized with QPilot, all values for weight and dimensions are included.

However, WooCommerce defines the units of measurement as a site-wide setting (you can locate this setting in WooCommerce here  WP-Admin > WooCommerce > Settings > Products >> General).

This means that you should ensure that your QPilot Site defines the default units of measurement the same way as your WooCommerce site does.  Doing so will help ensure that weight and dimensions are consistent across all of the product data that is sent from WooCommerce to QPilot.

Overriding WooCommerce Units of Measurement Per-Product

It is possible to override the site-wide setting of unit of measurement for WooCommerce Products.  For example, you could use a plugin or custom code that enables you to define the Unit of Measurement for a specific WooCommerce Product that is unique and different from the site-wide setting.

The  Autoship Cloud powered by QPilot plugin provides filters that enable WooCommerce Product's to send the unit of measurement for weight and dimensions for each product.  These filters are defined below:

  • Weight unit of measurement
    • ‘autoship_get_mapped_product_weight_unit' filter can be used to supply QPilot with the weight unit of measurement for a product
  • Dimension unit of measurement
    • ‘autoship_get_mapped_product_length_unit’ filter can be used to supply QPilot with the dimension unit of measurement for a product