Is it possible to get the cost via REST API?

Forums Cost of Goods for WooCommerce Is it possible to get the cost via REST API?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #89565
    York Ortiz Menendez
    Participant

    Hi Guys,

    Any answer on this matter?

    #89566
    Zohaib
    Participant

    Hi

    If you have installed the plugin, you can import product costs.

    In your WordPress dashboard, under the tools menu you will find an option for importing costs and bulk editing costs

    #89567
    WPFactory Plugins
    Participant
    Plugin Author

    Hello York,

    Our cost meta is already available via REST API. For example it’s possible to get a product with ID 123 using this route:

    http://example.com/wp-json/wc/v3/products/123

    The cost will be available over the meta_data array.
    The key name is _alg_wc_cog_cost

    I’ve never tried Integromat but probably this info should be also available on their end as the cost value is stored as a simple product meta.

    #90684
    Pablo
    Moderator
    Plugin Support

    Just a note,

    It’s possible to get the order cost like this:

    http://example.com/wp-json/wc/v3/orders/456

    The order cost meta (_alg_wc_cog_order_cost) will be available on the meta_data node.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.