product cost price


WooCommerce Product Cost Price module allows you to save the cost you pay for the products you sell in your WooCommerce store, as well additional information (shipping, etc.), for reporting purposes at a later date. When you come to off-set the price you are paying versus the price you sell for, this tool will come in handy! Save WooCommerce product purchase costs data for admin reports!

Default Price Fields

These are default product cost fields – choose which one (or none) do you need.

Woocommerce Cost Of Goods1

Custom Price Fields

Add custom fields, which will be included in product cost calculation. You can choose field’s name, type (percent or fixed) and default value.

Woocommerce Cost Of Goods2

Woocommerce Cost Of Goods6

Info Fields

Info fields are not used in product cost calculation, but you can save additional info (like purchase date) here.

Woocommerce Cost Of Goods3

Admin Orders List Custom Columns

If you want to add Profit column to admin’s products list page, you can enable it in this section.

Woocommerce Cost Of Goods4

Admin Edit Product

After you set all options, visit selected product’s edit page. There you will find Booster: Product Cost Price metabox. After filling metabox fields, press Update, and Booster will automatically calculate products cost and potential profit for you.

Woocommerce Cost Of Goods5Worker 1 Developers

If you need to retrieve saved cost in PHP – Booster uses `_wcj_purchase_price` meta key, e.g.:

echo get_post_meta( $product_id, ‘_wcj_purchase_price’, true );

This will return main product cost (purchase price). If you want to get final cost (i.e. with extra expenses, custom price fields etc.), you need to use `wc_get_product_purchase_price( $product_id = 0 )` function:

echo wc_get_product_purchase_price( $product_id );

We can add Tips & Trick to export the columns.

You can export these data by using our “Export” module and to include these Cost & Profit columns by these shortcodes accordingly. , .

`wcj_get_product_purchase_price` filter is applied to final function’s output:

apply_filters( ‘wcj_get_product_purchase_price’, $purchase_price, $product_id );
Accessible through:
  • WooCommerce > Settings > Booster > Products > Product Cost Price for WooCommerce
Tested on WooCommerce 8.8.2 and WordPress 6.5.2