Visser Labs – WooCommerce Plugins

  1. Home
  2. Knowledge Base
  3. WooCommerce Store Exporter Deluxe
  4. How to export cost of goods (COGS) in Store Exporter Deluxe

How to export cost of goods (COGS) in Store Exporter Deluxe

Working out your margins means putting cost data next to sales data in the same spreadsheet. So if you’ve gone hunting through Store Exporter Deluxe for a “COGS” option and come up empty, here’s the reason: cost of goods isn’t an export type of its own. It’s a set of fields you add to a normal Products or Orders export.

Store Exporter Deluxe reads cost of goods from two different sources, and the fields you’ll see depend on which one your store uses. Once a source is active, the matching fields show up in the field picker alongside every other column, ready to include in a Quick Export or a Scheduled Export.

Prerequisites

RequirementDetails
PluginStore Exporter Deluxe 5.4.2 or later, active and licensed. Support for WooCommerce’s built-in Cost of Goods Sold feature was added in 5.4.2
A COGS sourceEither WooCommerce’s built-in Cost of Goods Sold feature turned on, or the Cost of Goods extension active. See below for both
Cost values savedYour products need a cost stored against them. An export can only return data that already exists
Administrator accessYou’ll need an account with access to the WordPress admin dashboard

Where your COGS data comes from

WooCommerce’s built-in Cost of Goods Sold feature: Turn it on at WooCommerce → Settings → Advanced → Features by enabling Cost of Goods Sold. Each product then gets a Cost of goods field on the General tab of the Product data box. On a variable product, each variation gets its own Cost field, and leaving that blank falls back to the parent product’s value. For more on the feature itself, see WooCommerce’s own Cost of Goods Sold documentation.

The WooCommerce Features settings screen with the Cost of Goods Sold checkbox ticked
The Product data box on the General tab, showing the Cost of goods field filled in for a simple product

The Cost of Goods extension: This is the separate Cost of Goods extension, which adds its own cost field to simple and variable products. Store Exporter Deluxe detects it automatically and adds a different set of fields.

You can check what the plugin has detected at any time. Open WooCommerce → Store Export, then click Export Modules under the TOOLS group in the sidebar.

Which COGS fields you get

Export typeFieldCOGS source
ProductsCost of Goods SoldWooCommerce built-in
ProductsCost of Goods Sold (Effective)WooCommerce built-in
ProductsCost of GoodCost of Goods extension
OrdersOrder Total Cost of Goods SoldWooCommerce built-in
OrdersOrder Items: Cost of Goods SoldWooCommerce built-in
OrdersOrder Total Cost of GoodsCost of Goods extension
OrdersOrder Items: Cost of GoodsCost of Goods extension
OrdersOrder Items: Total Cost of GoodsCost of Goods extension

A few things worth knowing about these:

Cost of Goods Sold versus Cost of Goods Sold (Effective): The first returns the cost value saved on the product itself. The second returns the value WooCommerce actually applies to orders and analytics. For a variation with a blank Cost field, the effective value is the one inherited from the parent product, so the two columns can differ.

The extension’s product field is singular: It reads Cost of Good, not “Cost of Goods”. That’s the label the plugin uses, so search for it exactly that way.

Order Items fields follow the Items formatting setting: By default, Items formatting on the Order Items Formatting filter card is set to Combined, so the per-line-item costs for the whole order arrive together in a single cell. Switch it to Individual and each line item gets its own row instead, with that item’s cost in the column.

A third plugin, WooCommerce Profit of Sales Report, adds its own Cost of Good field to Products exports and an Order Items: Cost of Good field to Orders exports. Both work the same way as the fields above, and appear only when that plugin is active.

COGS fields appear on their own as soon as a source is active. There’s nothing to register first. If you can’t find any of them in the field picker, no COGS source is active on your store.

Add COGS fields to a Quick Export

COGS fields aren’t part of the default field selection, so you need to add them by hand each time you build a new export.

  1. Open WooCommerce → Store Export from the WordPress admin menu.
  2. Click Quick Export in the sidebar. It’s the standalone button above the EXPORTS group.
  3. On the Select Export Type step, click the Products tile. For order-level costs, click Orders instead.
  4. Expand the Export Fields step.
  5. Click Add more fields to open the Select Export Fields dialog.
  6. Type cost into the Search fields… box to narrow the list down.
  7. Tick the checkbox next to each COGS field you want.
  8. Click Save Fields to close the dialog.
  9. Back on Export Fields, drag the new field into the position you want it to hold as a column.
  10. Expand Filters & Sorting to narrow down which records get included.
  11. Expand Export Options and pick a file format.
  12. Click Run Export.
  13. Click Download File once the export finishes.
The Select Export Fields dialog filtered to cost, showing the Cost of Goods Sold and Cost of Goods Sold (Effective) checkboxes in the Basic Info group

On a Products export, the built-in Cost of Goods Sold fields sit in the Basic Info group of the field picker, not Pricing. Searching is quicker than browsing by group, but if you do browse, that’s where to look.

Each field in your selection also has a rename (pencil) icon. Click it if you’d rather the column header in your file read something other than the plugin’s default label.

The Export Fields step with both COGS fields added to the selected columns, and the rename icon on a field chip highlighted

For a full tour of the rest of the screen, see How to export WooCommerce products with Store Exporter Deluxe.

Filter which records get included

The Filters & Sorting step controls exactly which products or orders land in your file. What you see there depends on the export type you picked.

On a Products export, you can filter by Categories, Tags, Product Types, Product Status, Brands, Shipping Class, Stock Status, Stock Quantity, Featured, User Role, and two date ranges: Published Date and Modified Date.

On an Orders export, the most useful ones for cost reporting are Order Status, Order Date, and Date Modified. You can also filter by Payment Gateway, Billing Country, Shipping Country, Shipping Method, Customer, Coupon Code, Product, Product Category, Product Tag, and Product Brand, among others.

For a monthly margin report, set Order Status to your completed statuses and set Order Date to the range you’re reporting on. That keeps refunded and abandoned orders out of the totals.

At the bottom of the step, Sort by and Order control how the rows are ordered in the file.

Export COGS on a schedule

Scheduled Exports work differently from Quick Export in one way that matters here.

The Scheduled Export wizard doesn’t let you tick individual fields. There’s no equivalent of the Select Export Fields dialog you get in Quick Export, so you can’t pick a single COGS field here. You need to get it in another way.

The General step offers three choices under Export Fields:

All Fields: Exports every available field for the type, COGS included. This is the fastest route, but it produces a wide file.

Use Template: Applies a saved export template. Build a template containing your COGS field first, then pick it here. This is the tidiest option for a recurring report.

Saved Selection: Reuses the field selection you last saved in Quick Export for that export type. So set your COGS fields up in Quick Export first, then choose this.

The Export Fields section of the Scheduled Export General step, showing the All Fields, Use Template and Saved Selection choices

To create the schedule:

  1. Open WooCommerce → Store Export, then click Scheduled Exports under the EXPORTS group.
  2. Click New Schedule.
  3. On the General step, enter a name in the Schedule Name field.
  4. Choose Products or Orders from the Export Type dropdown.
  5. Choose a file format from the Export Format dropdown.
  6. Under Export Fields, pick All Fields, Use Template, or Saved Selection.
  7. Click Next: Filters and set any conditions that narrow down what gets exported.
  8. Click Next: Method to choose how the file is delivered.
  9. Click Next: Scheduling to set how often it runs.
  10. Click Next: Advanced to set the log level and other per-schedule options.
  11. Click Create Schedule to save.

Once it’s saved, open the schedule again and click Execute Now to run it immediately. Check the resulting file to confirm the COGS column is present before you rely on the schedule.

For everything else the wizard covers, see How to schedule exports in Store Exporter Deluxe.

If your cost data lives in a custom meta key

Some cost plugins aren’t detected by Store Exporter Deluxe. If yours isn’t, you can still export its data by registering the meta key it uses as a custom field.

  1. Open WooCommerce → Store Export, then click Custom Meta Fields under the TOOLS group.
  2. Click Add Custom Field.
  3. Choose Products or Orders from the Export Type dropdown.
  4. Enter the meta key in the Product Meta box, one key per line. On an Orders export, use the Order Meta box instead.
  5. Confirm Quick Export and Scheduled Export are ticked in the Available In group. All three options are ticked by default.
  6. Click Save Fields.

The key then appears in the Select Export Fields dialog under the Custom Meta Fields group.

The column header is built from the meta key itself, not from a friendly name. Store Exporter Deluxe strips one leading underscore, turns the remaining underscores and hyphens into spaces, then capitalises the first letter only. So _wc_cog_cost becomes Wc cog cost and _cogs_value becomes Cogs value. Use the rename icon on the field in Export Fields if you want a cleaner header.

For the full details, see Exporting custom product, order, and order item meta.

Troubleshooting

No COGS fields appear in the Select Export Fields dialog
No COGS source is active. Check WooCommerce → Settings → Advanced → Features and confirm Cost of Goods Sold is enabled, or confirm the Cost of Goods extension is active. Then reload the Quick Export screen and open the field picker again.
The COGS column exports but every row is empty
The fields export what’s stored, so a blank column means no cost value is saved. Open one of the products, check the Cost of goods field on the General tab of the Product data box, and confirm a value is there. On a variable product, check the variation’s Cost field too.
Cost of Goods Sold is blank but Cost of Goods Sold (Effective) shows 0.00
That’s expected. The first column returns nothing when no cost is saved, while the effective column always returns a number and falls back to zero. Treat a 0.00 in the effective column as “no cost recorded”, not as a genuine zero cost.
My scheduled export doesn’t include the COGS column
The Export Fields choice on the General step is most likely set to Saved Selection while your Quick Export selection doesn’t contain a COGS field. Either switch to All Fields, or set the COGS field up in Quick Export first and save it.
The COGS column header reads something like “Wc cog cost”
That’s a custom meta field, not one of the plugin’s built-in COGS fields. The header comes straight from the meta key. Use the rename icon on that field in the Export Fields step to set a friendlier header.

FAQ

Is there a separate COGS export type?
No. Cost of goods is a group of fields on the existing Products and Orders export types, so you’ll always start by picking Products or Orders.
Can I export cost and revenue in the same file?
Yes. On an Orders export, add a COGS field alongside the order total and item fields you already use. Every column comes out in the same row, so you can calculate margin in your spreadsheet.
Do COGS fields work for variable products?
Yes. Cost of Goods Sold returns the value saved on the product, and Cost of Goods Sold (Effective) returns the value WooCommerce actually applies, including the cost a variation inherits from its parent.
Can I get the cost of each line item on an order?
Yes. Add Order Items: Cost of Goods Sold on an Orders export. With Items formatting left on its default of Combined, it returns the per-item costs for the order together in a single cell. Set Items formatting to Individual instead and each line item gets its own row, with that item’s cost in the column.

Need more help?

If you’re using Store Exporter Deluxe and your COGS columns still aren’t exporting as expected, open a support ticket, and our team will take a look at your setup.

If you’re using the free Store Exporter plugin, ask on the WordPress.org support forum, and our team will get back to you there.

Was this article helpful?

Related Articles

Resources & Help