Support » Plugin: Custom Product Tabs for WooCommerce » Does plugin support WooCommerce REST API in general 3.0 REST API specifically

  • Resolved warrior7089

    (@warrior7089)


    Hi, is it possible to import products in bulk with custom tabs in metadata argument using WooCommerce 3.0 REST API?

    meta data

    I’ve tried to do it, but don’t know what’s the correct format of meta_value, because it’s serialized. For meta_key yikes_woo_products_tabs was used.
    Thanks in advance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi @warrior7089,

    I’m not quite sure what you mean. The post meta should be accessible like any other post meta field, and the meta_key is yikes_woo_products_tabs as you said. The data is serialized. What issues are you experiencing? What ‘format’ are you looking for?

    Let me know,
    Kevin.

    Hi, Kevin.
    I would like to import woocommerce products using WooCommerce REST API. So, given csv file with products data, i just POST them via the API according to documentation
    As custom tabs are meta data, i thought it’s possible to put in the csv information which will be placed in custom tabs and put it in meta data. Thus, manual adding of tabs and their content won’t be necessary, the same way, manually adding of products is not necessary if bulk import via REST API is used.

    If it’s possible to import custom tabs, i don’t know what to put in meta data argument for custom tabs.
    Hope it’s clear.

    • This reply was modified 2 years, 7 months ago by warrior7089.
    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi @warrior7089,

    How are you creating the CSV file? Are you pulling data directly from the database? If you try to put the serialized meta_value of the yikes_woo_products_tabs item, it will most likely not work because the data is serialized; I’m thinking you’ve tried this and that’s why you’re here.

    To import via the API, I would think you would need to unserialize the yikes_woo_products_tabs data into an array first. This is an array of arrays, with each array containing a tab_id, tab_content, and tab_title. If you had a way to break this data out and put it into one column each, you could then concatenate it all together again.

    This doesn’t seem ideal though, especially if you can’t interact with the serialized array as a single key => value pair via the API.

    I’m not sure if I’ve answered your question. Let me know.
    Kevin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Does plugin support WooCommerce REST API in general 3.0 REST API specifically’ is closed to new replies.