Custom Fields
Re-Envisioned
Support General Adding custom field in the Woocommerce product data

  • Creator
    Topic
  • #33036
    Resolved Cristian Uibar
    Participant

    Hello team,

    I want to add a custom field say Cost Of Goods under the Regular Price field inside of Product data in the Products post type. This way when a store manager updates the price of a product he can also update the cost of it in the same place.

    So far I only know how to add it in a new field group that shows under the Product Data itself. But that is not the ideal scenario.

    I use MetaBox AIO and I add the fields via the UI. If this is possible only via code please show me how and I'll do it via code.

    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #33044
    Long Nguyen
    Moderator

    Hi,

    Thanks for reaching out.

    It is not possible to use Meta Box to create WooCommerce custom fields in the product data box. WooCommerce uses its own functions to create and update data in the box.

    You can create the custom fields for product post type and fill value, but you need to use the code to output the value on the product page. Refer to this article https://metabox.io/add-custom-fields-for-woocommerce/

    #33045
    Cristian Uibar
    Participant

    Hi Long,

    Thank you!

    I see. That's a bummer. I was expecting MB to have an integration of some kind for Woo that I was not aware of. So after all it'll have to do with the custom metadata under the Woo product data itself.

    Kind regards,
    ~Cristian

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