1. Documentation /
  2. Cost of Goods

Cost of Goods

Cost of Goods allows you to easily track total profit and cost of goods by adding a Cost of Good field to simple and variable products. Costs per item and order are automatically calculated on checkout, and in-depth reports provide exactly the information you need to improve your bottom line, including information on most and least profitable sellers.
Want to be able to export orders with cost data? Check out the Customer / Order / Coupon Export extension, which is compatible with Cost of Goods.

Installation

↑ Back to top
  1. Download the extension from your WooCommerce dashboard
  2. Go to Plugins > Add New > Upload and select the ZIP file you just downloaded
  3. Click Install Now, and then Activate
  4. Click the Configure link and read the next section to learn how to setup and configure the plugin.

Requirements

↑ Back to top
  • PHP 5.3+ (You can see this under WooCommerce > Status)

Setup and Configuration

↑ Back to top
To start tracking your profitability, you must configure your cost settings, then set a “Cost” for any products you sell.

Extension Settings

↑ Back to top
Checkout Fees, Shipping Costs, and Taxes can be individually excluded from the profit reports by going to WooCommerce > Settings > Products > Inventory and scrolling down to “Cost of Goods Options”. By default, all of these components should be excluded from profit calculations (recommended settings). By unchecking these boxes, profit calculations will include these fees, costs, and taxes as income, and will therefore be included in your profit. If an item costs you $3, you sell it for $10, profit is normally $7. If the tax and shipping charged to the customer amount to $3 and you include them in profit calculations, your profit will be shown as $10 instead. Only enable these options if you want shipping or taxes included in your income. Some customers include shipping, for example, since they later deduct shipping as a fixed cost from their accounting. To get the most accurate profit reporting for most stores, you’ll probably want to exclude these items. If you want to exclude any of these parameters, check its box in these settings:
WooCommerce Cost of Goods settings
WooCommerce > Settings > Products > Inventory
Saving your settings will not trigger the “Apply Costs” action — this action is only triggered by clicking the “Apply Costs” button. *Note: Fees are determined by recognizing any costs added using the WooCommerce fees API (such as fees added by plugins like Checkout Add-ons). These cannot be configured by the administrator, and the option is simply meant to remove these fees as income in the profit calculation if you choose to exclude them.

Product Costs

↑ Back to top
You can add a cost to your products while editing them, and this should only be your cost of producing the good, and should not include tax or shipping. This is done from the Product Edit screen where a new “Cost of Good” field is added to the standard pricing fields for simple products:
WooCommerce Cost of Goods: Simple Product Cost Configuration
Simple Product Cost Configuration
Alternatively, you can edit multiple product costs at the same time using the “Bulk Edit” action on the Product View screen. With the Bulk Edit action, you can set a specific cost or increase/decrease the cost by a fixed amount or percentage for multiple products:
WooCommerce Cost of Goods: Bulk Edit Product Cost Configuration
Bulk Edit Product Cost Configuration
Product variations are handled in a similar manner. You can add a default cost for all product variations:
WooCommerce Cost of Goods: Variable Product Cost Configuration
Variable Product Cost Configuration
Or, you can manually set a cost for each variation (or override the default cost for only certain variations):
WooCommerce Cost of Goods - variation
Default Variable Product Cost Override
Once the Cost of Goods for a product / variation is configured, there’s no more to it. Orders placed from the checkout page, or manually placed through the admin, will automatically have their costs calculated and stored. Furthermore, the cost at the time of order creation is recorded so that cost totals can be recalculated at any time using the original product costs.

Previous Orders

↑ Back to top
You can now apply a cost of goods to previously placed orders if desired. Once you install the extension and set costs for your products, you can apply these costs to previously placed orders which don’t already have a cost calculated. Orders will be searched for products that are currently in your catalog and the relevant costs applied so that you can get immediate insight into your profitability.
WooCommerce cost of goods: apply cost to previous orders
Applying costs to all previous orders
If you choose to override costs this will also override any historical costs associated with orders. This setting is not recommended for most use cases. For example, let’s say one product has historically had a cost of $12 — this will be included in all orders, even if you have now updated the cost to $13 (this is designed to keep historical profit reporting accurate). If you use the general “Apply Costs” action, orders of this product will not be modified because it had a cost associated. If you choose to override costs, the historical cost will be changed from $12 to $13, changing your previous profit reporting. Only use this setting if you intend to update costs for old orders.

Powerful Reports

↑ Back to top
The plugin adds a number of new reports found under WooCommerce > Reports under the new “Profit” tab and existing “Stock” tab to give you insight into your product costs and profitability. All reports under the profit tab will show data for a specific time span along with a helpful graph of data for the given time span. You can view reports for:
  • Year – Data for the current year
  • Last Month – Data for the previous calendar month
  • This Month – Data for the current calendar month
  • Last 7 Days – Data for the past 7 calendar days
  • Custom – Data for a specific (configurable) date range

Profit by Date

↑ Back to top
All profit by date reports will allow you to see your net sales (minus costs you’ve excluded), total cost of goods, total profit, and average profit per order for the selected time span. Hovering over an overview on the left side will highlight the correct portion of the graph.
WooCommerce Cost of Goods Profit by date
Profit by Date report

Profit by Product

↑ Back to top
All profit by product reports will allow you to see your net sales (minus costs you’ve excluded) for the item, total costs for the item, total item profit, and total item purchases for the selected time span. In order to view a report, you must select a product in the “Product Search” section. Hovering over an overview on the left side will highlight the correct portion of the graph.
WooCommerce Cost of Goods Profit by product
Profit by Product report
The profit by product reporting section also has a helpful, adjustable widget that will show you most profitable and least profitable sellers for your given time span. You can switch between “most profitable” and “least profitable” product lists by clicking the action in the bottom right of the widget.
WooCommerce Cost of Goods most profitable products widget
Most Profitable Products
WooCommerce Cost of Goods least profitable products widget
Least Profitable Products

Profit by Category

↑ Back to top
All profit by category reports will show you total profit for each selected category within your given time span. Hovering over an overview on the left side will highlight the correct portion of the graph.
WooCommerce Cost of Goods Profit by category
Profit by Category report
If you select a parent category (such as “Clothing”), the total profit for this category will include the sum of profit for products within this category along with those in child categories (such as “Hoodies” or “Tee shirts”).

Product Valuation

↑ Back to top
Only products that have “Manage stock” and a stock amount entered will be displayed in Product Valuations, as Cost of Goods needs to know how many units there are.
The product valuation report is located under WooCommerce > Reports > Stock > Product Valuation. This will show you your inventory value at retail price, total value by cost, and units in stock for every product. WooCommerce Cost of Goods Product Valuation report This list is also searchable. You can use the “Search” box to search for a product name and view only the returned results instead. WooCommerce Cost of Goods Product valuation - searched

Total Valuation

↑ Back to top
Only products that have “Manage stock” and a stock amount entered will be displayed in the Total Valuation, as Cost of Goods needs to know how many units there are.
The total valuation report is located under WooCommerce > Reports > Stock > Total Valuation. This is a simple report to give you the overall value of all stock on hand at retail and at cost for a complete inventory valuation.
WooCommerce Cost of Goods total valuation
Total inventory values

Cost Report Exports

↑ Back to top
To export WooCommerce reports, WooCommerce requires that your browser support the download property. The download property is supported in Firefox, Opera, and Chrome (not Safari or Internet Explorer).
All profit reports can leverage the WooCommerce Core “Export to CSV” action. This will export a CSV of the data shown in the report, such as date, cost, sales, number of orders, etc. The exported data will depend on which report you are currently viewing, and will include the data show in the report.
WooCommerce Cost of Goods Profit export
CSV Export: Profit by date
Product Valuation reports can also be exported to get a list of value at retail and value at cost. WooCommerce Cost of Goods Product valuation export

Managing Orders

↑ Back to top
If an order is editable (WooCommerce allows editing before the order is paid for), then the costs for the line item will be editable as well. The “Cost of Goods” value displayed is the total cost of the line item (product cost x quantity purchased), so editing this cost edits the cost for that entire line on the order.
WooCommerce Cost of Goods: Editing Cost
Editing Costs
Note that, if you adjust a line item’s quantity, the cost does not automatically update as well. This is because often when manually editing items, such as in the case of refunds, cost doesn’t always equal product cost * quantity. For example, you may want to double the cost for a particular order to indicate breakage during shipping, or to alter the cost from the product’s configured cost. As such, the plugin will suggest the cost as product cost * quantity, but you may configure whatever cost you’d like: WooCommerce Cost Of Goods: Suggested Order item cost If you need to edit the cost of a product, you can safely do so by editing the product itself. Orders already placed will maintain the historical costs, while new orders will use the updated product cost.

Refunded Orders

↑ Back to top
If you issue a refund, then the cost of the refunded item will be deducted from your order cost automatically. For example, if you have an order of a product with a $3 cost and a $10 retail price, when refunding that product, the $10 is deducted from your sales, and the $3 is also deducted from your total costs.
WooCommerce Cost of Goods: Refunded order
Refunded Order
WooCommerce refunds are stored as a unique order type (sort of a mirror / negative of the original order), but these are not editable, so editing the cost of the refunded item is not possible. If you want to “lose” an item to breakage or maintain its cost when refunded (so you’ll have negative profit tracked for that item), this is not quite possible with the current order set up, as refunded / paid orders are not editable. You’ll need to make all orders editable (be careful!) by adding this to your custom code plugin / theme functions.php:
// Make all WC order statuses editable
add_filter( 'wc_order_is_editable', '__return_true' );
You can then edit the cost to add additional cost for the breakage of the refunded item.

Compatible Plugins

↑ Back to top
Cost of Goods is compatible with several official WooCommerce extensions automatically.

Product Bundles

↑ Back to top
When Product Bundles is used to sell several products together as a group, you can set the cost for the products or bundle, depending on the bundle configuration. If a bundle is statically-priced, then cost will be assigned to the bundle as a whole. You must enter a cost for the bundle while creating / editing it:
WooCommerce Cost of Goods: Static bundle cost
Static Bundle Cost
Since the price is assigned to the bundle as a whole, the cost will be assigned to the bundle as a whole as well. This means that profit for a static bundle is tracked as profit for the bundle product, not for the component products.
WooCommerce Cost of Goods: Static bundle order with costs
Static Bundle Order
For a per-item bundle, since the pricing of each product is used, any costs configured for those products will be used as well. You must have “Per-item Pricing” enabled to create this type of bundle.
WooCommerce Cost of Goods: per item bundle costs
Per-item Bundle
Since the price is tracked per-product and sales are attributed to each product, then the cost for each product will be used as well (this must be configured for the product itself). This will track profit and costs for each component product in the same was as if they were sold individually.
WooCommerce Cost of Goods: Per-item Bundle Order with costs
Per-item Bundle Order

Product CSV Import Suite

↑ Back to top
Cost of goods can be set for products which are bulk added or updated by the Product CSV Import Suite by using the following column in your import file:
Column Description Accepted Values Example
cost_of_good The cost of the item Numerical 99.99

WooCommerce Product CSV Import

↑ Back to top
Cost of goods can also be set for products which are imported using the built in WooCommerce Product CSV Importer by using the following columns in your CSV file:
Column Description Accepted Values Example
Meta: _wc_cog_cost_variable The cost of the variable product Numerical 99
Meta: _wc_cog_cost The cost of the simple product Numerical 99
Meta: _wc_cog_min_variation_cost The minimum cost of the variant item applied to the variation product Numerical 99
Meta: _wc_cog_max_variation_cost The maximum cost of the variant item applied to the variation product Numerical 99
Please note that the “Meta:” prefix is required by the plugin in order to map the data to product meta correctly. If importing variations for a variable product, the CSV file will need to:
  • Have the “Type” column set to “variation”
  • The “Parent” column set to the main variable product SKU
  • The “Meta: _wc_cog_cost” column set for each variation.

Customer / Order / Coupon Export

↑ Back to top
The WooCommerce Customer / Order / Coupon Export extension is compatible with Cost of Goods. When using a CSV custom format, you’ll be able to add order total costs into the custom format. If you use a custom one-row-per-item format, then the line item’s cost is also available to add as a column. If using a one-row-per-order format, then this item cost will automatically be added to the line_items column data. WooCommerce Cost of Goods: compat with Customer / Order CSV Export When using another format, exported CSV order data from this plugin will automatically include the total cost for the order and the total cost for each line item in the order as the last columns.
Column Description Outputted Value Example
order_cost_total The total cost for the order Numerical 19.99
total_cost The total cost for the line item Numerical 3.99
item_cost* The cost for the individual line item Numerical 1.99
*added to Default: One Row per Item format When using default and legacy formats for XML export, the export will automatically show the order’s total cost, while you can opt whether or not to add this to a custom format: WooCommerce Cost of Goods: XML Export compatibility
XML Data Description Outputted Value Example
<OrderCostTotal> The total cost for the order Numerical 19.99
<LineCostTotal> The total cost for the line item (total quantity) Numerical 3.99
<ItemCost> The cost for the individual item Numerical 1.99

Metorik

↑ Back to top
Cost of Goods is also compatible with Metorik for store reporting, and you can read more here.
You should install Cost of Goods and set costs for orders before connecting to Metorik. If you install Cost of Goods after your store is connected, you should reach out to Metorik support to re-sync your orders.
This is especially useful if you’re looking for profit margin for products or orders. Order reports can show a breakdown of profit and margin: WooCommerce Cost of Goods Profit report While product lists in Metorik will show cost of goods, profit per product, and margin per product. WooCommerce Cost of Goods Metorik profit margin

Measurement Price Calculator

↑ Back to top
Cost of Goods is also compatible with the WooCommerce Measurement Price Calculator plugin: when using the calculated price option, cost of goods will be automatically calculated. WooCommerce Cost of Goods: automatic calculation

Troubleshooting

↑ Back to top
Having trouble exporting your new reports? Be sure you’re using a supported browser. Not seeing all products under valuation report? Please ensure manage stock is enabled and a stock quantity is entered for the product. Experiencing any other issues? We’d be happy to assist! Get in touch with support via the help desk and please include a detailed description of the issue.

Frequently Asked Questions

↑ Back to top
Q: Will I be able to view profit and cost reports for previous orders placed before I install the plugin? A: Yes, you can view profits for orders placed before using this plugin! The plugin can apply current costs to all previous orders so that you can gain immediate insight into most and least profitable sellers.
Q: Does this plugin support WooCommerce Bookings? A: In a very basic way. You can set the cost for the booking product as a whole currently. This is helpful for bookings like appointments or event tickets that will have a set cost for the booking purchase. For example, if you sell appointment blocks, you can set a cost for this booking. This doesn’t not work very well if you have a booking that uses blocks configurable by the customer (like hotel rooms), as the cost cannot be set per block. We do have full compatibility with block costs on our roadmap, and you can let us know your interest in this the Woo Ideas board.
Q: Does this plugin support WooCommerce Product Bundles? A: Yes! You can read full details above.
  • Bundled items in per-item-priced containers will use the cost set on each individual item
  • Bundled items in statically-priced containers will use the cost set at the bundle level

Q: Does this plugin support WooCommerce Product Add-Ons? A: No. Product Add-ons is not compatible at this time.

Questions & Support

↑ Back to top
Have a question before you buy? Please fill out this pre-sales form. Already purchased and need some assistance? Get in touch with support via the help desk.