For example, you use plugin "Cost of Goods" (by SkyVerge) and want to show this price for selected product
You must do these actions
- enable showing extra column in >Settings>Interface
- generate content using hook wpo_product_extra_col_value.
For "Cost of goods" plugin (SkyVerge) -- use this code
add_filter("wpo_product_extra_col_value", function($html,$product,$cart){ return wc_price( get_post_meta($product->get_id(), "_wc_cog_cost", true) ); },10,3);
For YITH WooCommerce Cost of Goods -- use following version
add_filter("wpo_product_extra_col_value", function($html,$product,$cart){ return wc_price( get_post_meta($product->get_id(), "yith_cog_cost", true) ); },10,3);
Add some products and you will see