I am using wp_set_object_terms to add terms (attributes) to our WooCommerce products:
wp_set_object_terms($id, array($migrate_case), 'pa_case');
This gives us the advantage (instead of using wp_set_post_terms) that non-existing terms are created automatically.
Is there any way to get wp_set_object_terms() to tell me if it had to create a new term?
Thanks in advance for any help.