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 you cannot find the switch, check your version first.
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 first shipped as an experimental feature in WooCommerce 9.5, in December 2024, and became a regular one in WooCommerce 10.3, released on October 22, 2025. It is still opt-in, so many stores 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 reads later. A refund on that order can rewrite it, as explained in a refund changed my historical profit; - 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, update first: in older versions the field was still experimental, and Merchgain needs 10.3 or newer.
- 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 store, and Merchgain only reads.
Related answers
Doesn't match what you see in your store? Email us—we read every message. contact@merchgain.com