Hi there!
I am not sure how you are adding the custom description for the instructors, but here is how I did it on my test site.
I created a custom field called Instructors for WooCommerce products using https://ww.wp.xz.cn/plugins/advanced-custom-fields/
Then I created the additional tab with this code;
add_filter( 'woocommerce_product_tabs', 'woo_new_product_tab' );
function woo_new_product_tab( $tabs ) {
// Adds the new tab
$tabs['test_tab'] = array(
'title' => __( 'Instructor', 'woocommerce' ),
'priority' => 50,
'callback' => 'woo_new_product_tab_content'
);
return $tabs;
}
Then to display the content of the custom field I used;
function woo_new_product_tab_content() {
// The new tab content
$prod_id = get_the_ID();
echo'<p>'.get_post_meta($prod_id,'instructors',true).'</p>';
}
With instructors being the custom field I created.
Now when I add content to this custom field on the product, it will only show the content for that product and only on the product.

Link to image: https://cld.wthms.co/4ztObb
Hi!
Thanks for getting back to me so quick. I was hoping to cross reference the taxonomy of instructor with the products (courses in this case) so that the client just needs to put the description of the instructor once (in the description field of the custom taxonomy) and then every course with that instructor pulls in the description.
I can also create a custom post type of instructor and then use ACF to link the post to the product, but I was hoping there was a way to use the taxonomy description as a simpler/more elegant solution.
thanks for your help,
Krisztina.
Ah, I understand now! Sorry for the misunderstanding!
You will need to check the product for which instructor is added to it then echo the relevant description for that instructor.
Here is my final code that worked on my test site;
add_filter( 'woocommerce_product_tabs', 'woo_new_product_tab' );
function woo_new_product_tab( $tabs ) {
// Adds the new tab
$tabs['test_tab'] = array(
'title' => __( 'Actor', 'woocommerce' ),
'priority' => 50,
'callback' => 'woo_new_product_tab_content'
);
return $tabs;
}
function woo_new_product_tab_content() {
$terms = get_the_terms( $post->ID, 'actors');
if ( $terms ) {
foreach ( $terms as $term ) {
$termid = 'actors' . ($term->term_id);
echo $term->description;
}
}
}
In my case, I used Actors, but you can just change all references of actors to the slug of your custom taxonomy
We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.