Documentation for the Cost of Goods for WooCommerce plugin.

Cost of Goods for WooCommerce

Products

Admin Products List Columns

This section lets you add custom “Cost of Goods for WooCommerce” plugin columns to WooCommerce admin products list.

Cost of Goods for WooCommerce - Products - Admin Products List Columns

Product cost
Displays product cost.
Default: no
Product profit
Displays product profit.
Default: no

General Products Options

Cost of Goods for WooCommerce - Products - General Options

Cost field label
This is used in admin single product edit pages. Available placeholders: %currency_symbol%.
Default: Cost (excl. tax) (%currency_symbol%)
Product profit HTML template
This is used in admin single product edit pages, and in admin products list “Profit” column. Profit percent is “profit / cost”. Margin is “profit / price”. Available placeholders: %profit%, %profit_percent%, %profit_margin%.
Default: %profit% (%profit_percent%)
Add stock
Adds “Cost of Goods: Add stock” meta box to the product edit page. This will automatically calculate new average cost of goods for the product, based on new “Stock” and “Cost” values you enter.
Default: no

Quick and Bulk Edit

Cost of Goods for WooCommerce - Products - Quick and Bulk Edit

Quick edit
Adds “Cost” field to product “Quick Edit”.
Default: no
Cost of Goods for WooCommerce - Quick Edit
Product “Quick Edit” example.
Bulk edit
Adds “Cost” field to product “Bulk Actions > Edit”.
Default: no

Orders

Admin Orders List Columns

This section lets you add custom “Cost of Goods for WooCommerce” plugin columns to WooCommerce admin orders list.

Cost of Goods for WooCommerce - Admin Orders List Columns

Order cost
Displays pre-calculated order total cost.
Default: no
Order cost: Order statuses
Select order statuses to show cost column. Leave empty to show for all orders.
Default: None
Order profit
Displays pre-calculated order profit.
Default: yes
Order profit percent
Displays pre-calculated order profit percent (i.e. profit / cost).
Default: no
Order profit margin
Displays pre-calculated order profit margin (i.e. profit / price).
Default: no
Order profit: Order statuses
Select order statuses to show profit column. Leave empty to show for all orders.
Default: None

Admin Order Edit

Options for the admin order edit pages.

Cost of Goods for WooCommerce - Admin Order Edit

Item costs
Adds costs inputs for each order item to admin order edit page. Possible values: Enable; Readonly; Disable; Disable but show as standard meta.
Default: Enable
Order meta box
Displays “Cost of Goods” meta box on admin order edit page.
Default: yes
Cost of Goods for WooCommerce - Admin Order Meta Box - Order Page
Admin order meta box example.
Order meta box: Order profit HTML template
This is used in meta box. Available placeholders: %profit%, %profit_percent%, %profit_margin%. Profit percent is “profit / cost”. Margin is “profit / price”. Please note: to display %profit_percent% and %profit_margin% for orders created before plugin v2.2.0 was installed, you will need to recalculate orders cost and profit.
Default: %profit%
Admin notice
Adds notice to admin order edit page in case if order profit is below zero.
Default: no
Admin notice: Text
“Admin notice” option must be enabled.
Default: You are selling below the cost of goods.
Fill in on add items
Fills in item costs with the default costs when adding new items (i.e. “Add item(s) > Add product(s)”).
Default: yes
Save on item edit
Saves item costs when editing order items (i.e. “Edit item > Save”).
Default: yes
"Recalculate" button
Select what should be done when admin clicks “Recalculate” order button. Possible values: Do nothing; Fill in empty item costs with the default costs; Fill in all item costs with the default costs; Save all item costs.
Default: Do nothing

Calculations

Here you can set some options for order cost and profit calculations. You will need to recalculate order’s cost and profit after you change these settings.

Cost of Goods for WooCommerce - Calculations

Count empty cost lines
Count empty cost items when calculating order cost and profit. You will need to recalculate order’s cost and profit after you change this option.
Default: no
Order total for percentage fees
Total to calculate all extra costs percentage fees from (“All Orders”, “Payment Gateways”, “Shipping Methods”). Possible values: Order subtotal excl. tax; Order total excl. tax; Order total incl. tax.
Default: Order subtotal excl. tax
Shipping to profit
Adds order shipping cost to the order profit.
Default: no
Fees to profit
Adds order fees to the order profit.
Default: no
Delay calculations
Select order statuses to delay all order profit, cost etc. calculations until. All values will be set to zero until the required order status is set. Leave empty to calculate right away on new order.
Default: None

Extra Costs: All Orders

Here you can add extra costs for your orders, e.g. handling fees. You will need to recalculate order’s cost and profit after you change these settings.

Cost of Goods for WooCommerce - Orders - Extra Costs - All Orders

Fixed cost
In your shop currency.
Default: 0
Percent cost
Percent from order total (excl. tax).
Default: 0

Extra Costs: Per Order

Adds “Cost of Goods: Extra costs” meta box to admin order edit page. You may need to recalculate order’s cost and profit after you change these settings.

Cost of Goods for WooCommerce - Orders - Extra Costs - Per Order

Handling fee
Default: no
Shipping fee
Default: no
Payment fee
Default: no
Columns
Will add “Extra Cost: Per Order” columns to the WooCommerce admin orders list. One column per fee.
Default: no
Cost of Goods for WooCommerce - Extra Costs Per Order - Order edit
Extra costs per order example.

Extra Costs: From Meta

Adds extra costs from order meta. E.g.: Stripe – _stripe_fee, PayPal – PayPal Transaction Fee. You will need to recalculate order’s cost and profit after you change these settings.

Cost of Goods for WooCommerce - Extra Costs - From Meta

Meta keys
Ignored if empty. One meta key per line.
Default: None

Extra Costs: Payment Gateways

Here you can add extra costs for your orders based on order’s payment gateway. You will need to recalculate order’s cost and profit after you change these settings.

Cost of Goods for WooCommerce - Orders - Extra Costs - Payment Gateways

Enable section
Enables/disables “Extra gateway costs” section.
Default: no
Payment gateway X: Fixed cost
In your shop currency.
Default: 0
Payment gateway X: Percent cost
Percent from order total (excl. tax).
Default: 0

Extra Costs: Shipping Methods

Here you can add extra costs for your orders based on order’s shipping method. You will need to recalculate order’s cost and profit after you change these settings.

Cost of Goods for WooCommerce - Orders - Extra Costs - Shipping Methods

Enable section
Enables/disables “Extra shipping costs” section.
Default: no
Use shipping instances
Enable this if you want to use shipping methods instances (with shipping zones) instead of shipping methods. Save changes after enabling this option.
Default: no
Payment gateway X: Fixed cost
In your shop currency.
Default: 0
Payment gateway X: Percent cost
Percent from order total (excl. tax).
Default: 0

Multicurrency

Here you can set currency exchange rates for your orders in non-default shop currency, i.e. order cost and profit will be converted to the default shop currency according to these rates.

Cost of Goods for WooCommerce - Multicurrency

Enable section
Enables/disables “Multicurrency” section.
Default: no
Currencies
Choose currencies you want to set exchange rates for, and “Save changes” – new settings fields will be displayed.
Default: None
Currency pair X (e.g. EURUSD)
Default: 0

Multicurrency Advanced Options

"Multi Currency for WooCommerce" plugin
When enabled, the plugin will try to get currency exchange rates from the “Multi Currency for WooCommerce” plugin (by VillaTheme) automatically.
Default: no

Tools & Reports

Bulk Edit Costs Tool

Bulk edit tool is located in “Tools > Bulk Edit Costs”. Use it if you need to bulk edit costs for all products from a single page.

Cost of Goods for WooCommerce - Bulk Edit Costs Tool Options

Search products
Possible values: Search by title; Search all.
Default: Search by title
Edit prices
Enable this if you want to edit product prices in addition to cost of goods.
Default: no
Manage stock
Enable this if you want to manage products stock in addition to cost of goods.
Default: no
Manage stock: Stock update method
Ignored unless “Manage stock” checkbox is enabled above. Possible values: Update product meta; Use product functions.
Default: Update product meta
Product types
Select product type(s) to list in the tool (e.g. simple products, grouped products, external/affiliate products, variable products etc.). Leave empty to display all product types.
Default: None

Cost of Goods for WooCommerce - Bulk Edit Costs Tool

Import Costs Tool

Import tool is located in “Tools > Import Costs”. Use it if you need to import costs from other meta fields.

Cost of Goods for WooCommerce - Import Costs Tool Options

Key to import from
Meta key to import costs from.
Default: _wc_cog_cost
Cost of Goods for WooCommerce - Import Costs Tool
Product import costs tool example.

Orders Tools

Cost of Goods for WooCommerce - Orders Tools Options

Recalculate orders cost and profit for all orders
Set items costs in all orders (overriding previous costs). Enable the checkbox and save changes to run the tool.
Default: no
Recalculate orders cost and profit for orders with no costs
Set items costs in orders that do not have costs set. Enable the checkbox and save changes to run the tool.
Default: no
PHP memory limit
Will set PHP memory limit (in megabytes) right before tools are run. Ignored if set to zero.
Default: 0

Reports

Orders Report

Cost of Goods for WooCommerce - Tools and Reports - Orders

Orders report: Order status
Select order statuses for the “Orders > Cost of Goods” report. “Refunded” status is added automatically where applicable. If left empty then default value (“Completed”, “Processing”, “On hold”) is used. Possible values: Pending payment; Processing; On hold; Completed.
Default: Completed; Processing; On hold
Orders report: Extra data
To display data gathered before the plugin v2.0.0, you will need to recalculate orders cost and profit. Possible values: Item costs (excluding fees); Fees (all); Shipping method fees (all); Shipping method fees (fixed); Shipping method fees (percent); Gateway fees (all); Gateway fees (fixed); Gateway fees (percent); Order fees (all); Order fees (fixed); Order fees (percent); Per order fees (all); Per order fees: Handling; Per order fees: Shipping; Per order fees: Payment; Meta fees (all).
Default: None

Cost of Goods orders report is available in “Reports > Orders > Cost of Goods”.

Cost of Goods for WooCommerce - Orders Report

Stock Report

Cost of Goods stock report is available in “Reports > Stock > Cost of Goods”.

Cost of Goods for WooCommerce - Reports - Stock

WooCommerce Analytics

Orders
Will add “Cost” and “Profit” columns to the “Analytics > Orders” report.
Default: no
Cost of Goods for WooCommerce - Analytics - Orders
WooCommerce “Analytics > Orders” example.

Advanced

Force Costs Update

Cost of Goods for WooCommerce - Advanced - Force Costs Update

Force costs update on order update
Force empty order items cost update on each order update.
Default: no
Force costs update on order status change
Force empty order items cost update on order status change.
Default: no
Force costs update on new order item
Force empty order items cost update on new order item addition.
Default: no

Columns Sorting

Cost of Goods for WooCommerce - Advanced - Columns Sorting

Sortable columns
Makes columns added to admin products and orders lists sortable.
Default: yes
Sortable columns: Exclude empty lines on sorting
Default: yes