Hey @wiseupmarketing,
When you say you need to add a code snippet what type of code are we talking about, php or js?
Either way I suggest using a filter in your themes functions.php file. You can check to make sure you’re looking at the correct tab and then add the snippet in. If you are trying to add php this will be the most ideal and safe way to do this.
The following is an example that I pulled from the link that you’ll find at the end of my post. You can create a custom callback function for any tab. In this example we’re targeting the description tab. If you wanted to target a tab that you named “Limited Edition”, you would change this to $tab['limited-edition']
instead. In your callback you can create whatever code snippet you need for your tab.
Hope this helps!
Cheers,
Freddie
/**
* Customize product data tabs
*/
add_filter( 'woocommerce_product_tabs', 'woo_custom_description_tab', 98 );
function woo_custom_description_tab( $tabs ) {
$tabs['description']['callback'] = 'woo_custom_description_tab_content'; // Custom description callback
return $tabs;
}
function woo_custom_description_tab_content() {
echo '<h2>Custom Description</h2>';
echo '<p>Here\'s a custom description</p>';
}
Editing Product Tabs