Custom Fields
Re-Envisioned
Support MB Custom Table Extended Data for WooCommerce Products

This topic contains 1 reply, has 2 voices, and was last updated by  Anh Tran 7 months, 3 weeks ago.

  • Creator
    Topic
  • #11169
    Resolved
    Jason Ryan
    Participant

    Hello –

    I am just getting started with this plugin and so far so good. Before I go deeper into the rabbit hole on this project I am working on, I want to make sure I am setting things up correctly.

    I understand the need for Custom Tables for performance, but my question is this:

    I am adding custom meta boxes to build out a fully customized WooCommerce Product Page. I want this additional data to be stored with the Products themselves so that if they ever wanted to export all of their products, the additional information entered through the Meta Boxes is also exported with the main product data.

    Would storing the Meta Box data in a separate db table keep the relationship with each product ID it was entered on, or is that relationship between the Product and the Meta Box data separated due to being in separate tables? Whats the best approach to something like this?

    Any insight would be much appreciated. Thanks.

Viewing 1 replies (of 1 total)
  • Author
    Replies
  • #11212

    Anh Tran
    Keymaster

    I have answered these questions via email. I’ll post them here in case anyone has a similar problem:

    Would storing the Meta Box data in a separate db table keep the relationship with each product ID it was entered on

    The answer for this is YES. There’s a relationship between the products (posts table) and the custom table. Technically, the value of the custom table’s ID column = product (post) ID.

    Whats the best approach to something like this?

    If what you meant is exporting the data in the custom table when using the export functionality of WordPress, then I have to say it’s not supported. WP export feature seems to be limited to custom fields that stored in the post_meta table only.

    I have no good solution for this at the moment, as the task of exporting and importing data from custom table along with the product data seems to be complicated. It’s best to use some tools or plugins to export the whole database to SQL file. But I guess it’s not what you want.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.