EvanHerman / yikes-inc-easy-custom-woocommerce-product-tabs

This plugin extends WooCommerce by adding new product meta field, and allowing users to generate as many custom product tabs as they please.
GNU General Public License v2.0
15 stars 7 forks source link

shortcode for every custom tabs separate #171

Open adi-connectmedia opened 1 year ago

adi-connectmedia commented 1 year ago

Hello,

How create shortcode for every tab separately. I have custom single-products, and i need showing my tab separately

My shortcode:

function ap_custom_product_tabs_shortcode() {

$tabs = get_post_meta($product_id, 'yikes_woo_products_tabs', true);

$tab = array_filter($tabs, function($tab){
  return 'paletar-culori' == $tab['title'];
});

} add_shortcode( 'test_custom_product_tabs', 'ap_custom_product_tabs_shortcode' );