How to import WooCommerce tabs with Tab Manager

6 min read
Beka Rice

Product tabs are a great tool for organizing your product data, which is why WooCommerce Tab Manager can be very helpful. While the ability to add global and product-specific tabs is useful, you may want to import your tab data instead if you have several tabs to create.

This guide will show you how to import global and product-level WooCommerce Tabs with the WooCommerce Tab Manager.

This tutorial is only relevant for tabs created with the WooCommerce Tab Manager, not for generic WooCommerce product tabs.

What’s needed

In addition to the WooCommerce Tab Manager, you’ll need a CSV Import / export plugin that export custom post types (which are what custom tabs are). Any import / export plugin that can import and export custom tabs will work. Here’s a free CSV import / export plugin that we’ve used for this demo. This will cover you for importing global level tabs.

If you’d like to import product-specific tabs, you’ll also need to import / export some product data in addition to the tabs. If this is the case, then you’ll need the WooCommerce Product CSV Import / Export plugin as well (or another product import / export plugin that will allow you to set meta / custom fields). Since these tabs are related to specific products, we’ll need to add them to the product meta once they’re imported to tie them together.

Do a sample export

If you’d like to see how all of the post meta for the product tab is formatted, we recommend creating a couple of sample tabs and exporting them. We’ll include a sample import here, but please note that your CSV format may be different if you use a different import / export plugin. Doing a test export is the easiest way to see what format you need.

Export the wc_product_tab custom post type using your CSV export plugin. Here’s an example using the free plugin we mentioned above:

Export data

Export Tab Manager Tabs

This will provide an export of all global tabs (product-level tabs aren’t exported). Here’s an example of my export if you want to see what it looks like:

Download CSV Export

Create the tab import file

We won’t need to import all of these columns to create new tabs, but they work as a handy guide. Here are a few columns that we’ll need to pay special attention to to import WooCommerce tabs:

Column NameData to enter
post_contentThe content the tab should contain
post_titleThe tab’s title
post_nameThe slug for the tab
post_parentIf this is a product-specific tab, enter the product ID; for global tabs, enter 0
post_typeEnter wc_product_tab for all tabs

If you’re not sure how to get the product ID, check out [this tutorial on pricing tables], which shows how to do so. You don’t need to enter the tab’s post ID, as this should be generated on import, and the post status can be set to “publish”.

When you’ve created your CSV, import this as a custom post type.

Import custom post type

With most plugins, you’ll need to map your CSV data to fields, which should be straight-forward.

CSV Import Options

Finish with your import, and your new tabs will now be under WooCommerce > Tab Manager.

Finish import setup

Finish import setup

Here’s a sample CSV that you could use to import WooCommerce tabs from Tab Manager. Again, if you’re using a different importer, you may need to adjust this format.

Download Sample Import File

Import or Merge Products (optional)

If you’ve imported product-specific tabs, you’ll notice that the product itself hasn’t changed to add these tabs. That’s because we now need to edit the product to add the tab data to it. We’ll do so by importing the products to update the product meta we need to change to add these tabs.

When you import your products, you’ll need to set two pieces of meta information if you’d like to ensure that your product-level tabs will be set: the _override_tab_layout and _product_tabs meta.

For example, this can be done with the WooCommerce Product CSV Import / Export plugin by prefixing the column name with “meta:”, like this:


Set _override_tab_layout to “yes” if you’re going to set a product tab, then set up the meta:_product_tabs column. This is where things get tricky (and you may want to set the “ID” [post id] for your imported tabs manually upon import to help out with this).

Here’s a typical _product_tabs export for a product that’s overridden the tab layout:

{"core_tab_description":{"position":0,"type":"core","id":"description","title":"Description","heading":"Product Description"},"core_tab_additional_information":{"position":1,"type":"core","id":"additional_information","title":"Additional Information","heading":"Additional Information"},"core_tab_reviews":{"position":2,"type":"core","id":"reviews","title":"Reviews (%d)"},"product_tab_252":{"position":3,"type":"product","id":252,"name":"assembly-instructions"}}

This product contains the “Description”, “Additional Information”, and “Reviews” tabs, which are core tabs. However, notice at the end it also contains a product-specific tab. You’ll need to format your _product_tabs meta the same way for any product that should override the tab layout. Here’s the info I have for my product-level tab:


The first part identifies it as a custom tab, and the number is the tab post ID. You can set this manually in the import (so long as it doesn’t conflict with an existing post id), or you can find it by viewing your imported tab and hovering over it:

WooCommerce product tab id

Get Tab ID

You’ll also set this as the “id”. Set the position that the tab should display in (i.e., 0 for first, higher for last), and set the name as the tab slug / name that you imported. You can now use this info to customize your tab layout for the product.

Again, note that this may change depending on which product importer you’re using. Trying an export for a product, then matching that formatting is a great strategy to use.

Once you’ve imported or merged your products to update this meta, your tab layout will now be overridden and your imported product-level tabs assigned to their post parents.