Home Page › Forums › WooCommerce Custom Tabs › Allow Tabs to be Imported and Exported with WP All Import/Export
- This topic has 1 reply, 2 voices, and was last updated 4 years, 4 months ago by
WebshopLogic.
-
AuthorPosts
-
Participant
Hi,
We would like the ability to import and export all products like we do at the moment and have the tabs included in this, is this possible?Every time we export and import to update products in bulk, it is impossible to edit tab contents!
Kind Regards
KeymasterThere is no built-in export import function in the plugin, but tab data is stored as normal WordPress meta data, so you can manage tab data with general-purpose export import plugins.
I think you or your site administrator need WordPress technical knowledge for this.
You have to export and import 4 post meta fields for every tabs. I do not export import plugins (like WP All Import), but I suppose it is able to export/import data into post meta fields.
I describe which fields to export and import, I hope this will help you.
Let’s suppose you have registered a tab type called „mytab” and another tab type called „faq”, thus the slug of these tab types are „mytab” and „faq”, and these tab types can be used for the products that has to be imported (e.g. the tab types are marked as „Use for all products”)
4 meta fields of your products have to be exported/imported for every tab, thus for „mytab” and „faq” tabs the following 8 meta fields needed:
(in the list above, the first text is the meta key, the last is the meta value)meta key = meta value
——————————
_mytab = mytab
mytab = Content of my tab….
_mytab_custom_title = mytab_custom_title
mytab_custom_title = Title of my tab (optional, this value can be empty)_faq = faq
faq = Content of FAQ ….
_faq_custom_title = faq_custom_title
faq_custom_title = Title of FAQ (optional, this value can be empty)As you can see, there are „technical” meta fields, that just define tabs using an underscore prefix for meta keys and without underscore for meta values, and the real content goes into another meta fields that key does not contain the underscore prefix, and the meta value contains the content of that tab.
(This structure is used by the built in ACF – Advanced Custom Fields plugin for store meta data for meta fields).
Custom tab titles are stored another two meta fields that are similar but have “_custom_title” postfix.If you have technical question about how can a meta field imported, please ask the export/import plugin developers.
I hope this information helps to solve the situation.
Kind Regards,
Peter Rath -
AuthorPosts
- You must be logged in to reply to this topic.