My custom taxonomy (WooCommerce attribute) already exists and I am using the following to add a new term to the taxonomy and associate it with my WooCommerce product:

wp_set_object_terms($product_id, array($omega_jahr), 'pa_years-of-construction');

When I use the following to call the 'pa_years_of_construction' for my product, I can see that the new terms have been saved:

$v = array_values( wc_get_product_terms( $product->id, 'pa_years-of-construction', array( 'fields' => 'names' ) ) );

However, when I check my product attributes in the backed and frontend of my website, the 'pa_years_of_construction' attribution isn't showing up.

What am I missing here?

Thanks in advance for any help!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.