fbpx

Description

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 Product Cost Price - Admin Settings - Price Fields

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 Product Cost Price - Admin Settings - Custom Price Fields

Info Fields

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

WooCommerce Product Cost Price - Admin Settings - Info Fields

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 Product Cost Price - Admin Settings - Orders List Custom Columns

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.

Booster for Woocommerce Product Costs Per Product Backend

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 );

`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
Tested on WooCommerce 4.6.2 and WordPress 5.5.3
Plugin can be downloaded here. If there are any locked fields in the module, you will need to get Booster Plus to unlock them.