WooCommerce Cost of Goods Sold (COGS)

WooCommerce 9.9 introduces the Cost of Goods Sold (COGS) feature, which enables you to track the direct costs associated with the products sold in your store. This feature provides the necessary data to calculate accurate profit margins, empowering store owners to make data-driven decisions for pricing, marketing, inventory management, and more.

The Cost of Goods Sold (COGS) feature is currently available in WooCommerce 9.9 as part of the experimental features section. It will be officially moved out of beta in the upcoming WooCommerce 10.0 release.

What is Cost of Goods Sold (COGS)?

↑ Back to top

Cost of Goods Sold (COGS) is a key financial metric that allows you to calculate the direct costs associated with producing or purchasing the products that a business sells. By tracking COGS, store owners can determine the true profitability of their products and orders, leading to more informed business decisions.

Understanding the true cost of each product sold is fundamental to running a successful business. With COGS, store owners will be able to:

  • Accurate Profit Margins: Calculate exact profit margins for every product and order.
  • Data-Driven Decisions: Make data-driven decisions about pricing, marketing, and inventory management.
  • Enhanced Financial Insights: Track and manage store performance with greater precision.

Enable COGS Feature

↑ Back to top

To enable the Cost of Goods Sold (COGS) feature, please follow the steps below:

  1. Navigate to WooCommerce > Settings > Advanced > Features
  2. Scroll down to the Cost of Goods Sold option
  3. Check the box to enable Cost of Goods Sold
  4. Click Save changes
Enable the ‘Cost of Goods Sold’ feature

Setting COGS for Products

↑ Back to top

Once the COGS feature is enabled, you can set the cost for individual products and variations.

COGS for Simple Products

↑ Back to top

For simple products, please follow the steps below:

  1. Go to the Product Editor in the admin area.
  2. Under the General tab, you’ll find a new field labeled Cost of Goods.
  3. Set the cost value for the product (defaults to zero if not set).
Set COGS for Simple Products

COGS for Variations

↑ Back to top

For variable products, the Cost of Goods field in the General tab will display a default value inherited by all variations.

Set COGS for all variations

You can override the default value for each variation by entering a cost in the field for individual variations.

Set COGS for individual variations

A bulk action is available to remove custom costs from all variations, reverting them to the default cost.

Bulk Action: Remove Costs from individual variations

COGS in Orders

↑ Back to top

COGS details are also present within the order editor in the admin area. In the order editor, a new “Cost” column will display the cost of each item in an order (i.e., the individual product cost multiplied by the quantity of the line item). Additionally, the Cost Total will be shown next to the total order amount.

COGS in order editor

For orders with refunds, the Cost column will display the combined cost of the refunded items. Additionally, a tooltip is also available to show the cost per unit of each product.

Combined cost of the refunded items
Tooltip displays the cost per unit of product

Frequently Asked Questions

↑ Back to top

What happens if I use another COGS plugin alongside the WooCommerce COGS feature?

↑ Back to top

If both the WooCommerce COGS feature and another COGS plugin are activated, you will see two cost totals. Since we don’t create a preference for the core feature or other extensions, you’ll need to decide which COGS source is best for your needs.

Does the Analytics include COGS data?

↑ Back to top

Currently, the COGS feature does not integrate with WooCommerce Analytics.

Is the order item COGS stored in the order item meta table?

↑ Back to top

Yes, the COGS data is saved in the order item meta table. If the product’s price is updated after the order, the COGS for existing orders will not change.

Does COGS support import/export?

↑ Back to top

Yes, the WooCommerce core product CSV import/export tool is extended to support the COGS field. You can now export the COGS values and create a CSV import file to import these values back into your store.