RC2 - WooCommerce - Custom Product Tabs, linking/hooking into Single Product page

Hey Team

Looking to get an understanding of how to bring through Custom Product tabs into the new Single Product page Layouts area.

I can see in the templates the regular Woo tabs are utilised eg.:
{{dc:woocommerce:product_additional_information}}
{{dc:woocommerce:product_reviews}}

I’m currently using Yikes Custom Tabs - https://yikesplugins.com/plugin/yikes-custom-product-tabs-for-woocommerce/ - and was trying to get an understanding of what code/script (like the above two examples) would be needed to bring through the Custom Tabs created.

Any assistance is greatly appreciated.

Thanks
Sam

@futronline, I’ll need to look into this a bit further with @alexander and see what he thinks about this. There might be some way to make a generic WooCommerce Tab Dynamic Content string where you can reference an ID from a plugin or something, but as of now this is not supported. We will get back with you on this at some point, but I can’t speak to if it might be able to be addressed before the final release.

Thanks!

Hey @futronline,

So I’ve not tested this, but think it’s possible with a shortcode if you add one like this:

add_shortcode('output_wc_tabs', function( $atts, $content = '') {
  ob_start();
  woocommerce_output_product_data_tabs();
  return ob_get_clean();
});

Then [output_wc_tabs] could be used in a Text or Content Area element.

This would output the native WooCommerce markup which ensures all the hooks run that let plugins add custom tabs. There isn’t a clear path for us to support similar to the Product Tabs element because we don’t have a way to dynamically add tabs. I imagine it’s possible with more looper types but it isn’t something we’ve explored and I know it would take some reworking of the tab element as well.