How do I switch on Cost of Goods Sold in WooCommerce?
The cost field is a WooCommerce feature that ships switched off. Where the switch is, what it starts recording, and why nothing is filled in backwards.
The short answer
WooCommerce → Settings → Advanced → Features → Cost of Goods Sold. It is a WooCommerce feature, not a plugin setting, and it ships switched off. You need WooCommerce 10.3 or newer; if the switch is not in that list, your shop is on an older version.
From the moment you turn it on, the product editor gets a Cost of goods field and every new order records the cost of what it sold. Nothing is filled in for orders that already exist.
What WooCommerce actually does
The cost field went into the core in WooCommerce 10.3, released on 22 October 2025, after two beta cycles. It stays opt-in, so most shops have it switched off without knowing it exists.
With the feature on, three things start happening:
- the product, and each variation, can store a cost in
_cogs_total_value; - when an order is created, each line stores the cost as it was at that moment in
_cogs_value— this is the number a profit report can still trust years later; - the order keeps the sum of those in its own
_cogs_total_value.
The important part is what does not happen. Entering a cost today changes nothing about yesterday’s orders, by design: the cost of a sale is a historical fact, not a property of the product.
What to do about it
- Check your version in WooCommerce → Status. Below 10.3 there is nothing to switch on, so update first.
- Turn the feature on in Settings → Advanced → Features. It is a checkbox, and it changes no data by itself.
- Enter the cost on the products that actually sell, in the General tab of the product editor. Net of tax, for one item.
- Let the orders come in. The report fills up from the point where the costs are in place.
If your buying price moves over time, enter the current one and leave the history alone. Every order already remembers what it cost on the day it was placed.
How Merchgain reports it
Merchgain checks the feature through the public WooCommerce API
(FeaturesUtil::feature_is_enabled( 'cost_of_goods_sold' )) and, when it is off, shows a short
onboarding screen with a link to the right settings page — instead of a report with four zeroes
in it and no explanation.
It does not switch the feature on for you. That would be a write to your shop, and Merchgain only reads.
Related answers
Disagrees with what you see in your shop? Write to us — every message is read. contact@merchgain.com