Display field group in custom plugin page

Support MB Builder Display field group in custom plugin page

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #42907
    JorgeJorge
    Participant

    I've set a Field Group to appear in WooCommerce shop order pages. If I go to a single order, it works flawlessly. However, we're using a custom plugin to create orders in the backend and I'd like to display it there so the admin can fill the field when doing a new order. I tried copying/pasting the generated PHP code, but it only shows the labels and nothing more.

    Am I missing a step somewhere? Thank you!

    #42909
    PeterPeter
    Moderator

    Hello Jorge,

    If your plugin uses a custom page (like a settings page) to create orders in the admin area, the field group won't display there because it is associated with the post type "shop_order" and only displays when editing a post of that post type.

    #42923
    JorgeJorge
    Participant

    That's absolutely right Peter, I was just reading that doc, thank you.

    Is there any way to call that group field and add it to the plugin page so it can be filled there?

    #42929
    PeterPeter
    Moderator

    Hello,

    There isn't a way to display the field group on your settings page. You can create your own fields and update the value of the MB fields that display on the order page.
    Refer documentation https://developer.wordpress.org/reference/functions/update_post_meta/

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