How to display product profit programmatically?

Forums Cost of Goods for WooCommerce How to display product profit programmatically?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #89589
    WPFactory Plugins
    Participant
    Plugin Author

    Hi Luis,

    Yes, it’s not stored on a meta field. it’s calculated dynamically.
    If you’d like to get it from outside the plugin probably you’d be able to do it like this:

    alg_wc_cog()->core->products->get_product_profit_html( $product_id, $template = '%profit% (%profit_percent%)' );
    
    #90738
    Pablo
    Moderator
    Plugin Support

    Just a note,

    Now we are storing the product profit on some different meta fields:

    • _alg_wc_cog_profit
    • _alg_wc_cog_profit_percent
    • _alg_wc_cog_profit_margin
    • This reply was modified 2 years, 7 months ago by Pablo.
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.