WooCommerce: Custom dropdown for variation selection
I think the condition here has_term($term_slug, $taxonomy, $variation->get_id()) won’t work for variation. If you want to check term, we need to check with parent variable product instead of checking variation because Woocommerce doesn’t store any taxonomy/term attribute to variation. Instead of using has_term, we can use your existing attributes in get_variation_attributes to get and check … Read more