Reputation: 1
I would like to hide attributes terms or values from variation dropdown list and also enabled not disabled. just hide it from selecting in variations dropdown list because I want To use this variation ID as a single product.
My Example is hide attribute value woocommerce
I found the below code which helps me of what Exactly I need but it makes the attribute value or variation Id disabled and I can't use it anymore as a single product by variation Id
Hide specific product attribute terms on WooCommerce variable product dropdown
Upvotes: 0
Views: 789
Reputation: 1809
If you can hide an option/attribute only in this dropdown then you should have 2 options:
Hide by using CSS
Hide by using JS like this-
option1)
$('#test').find('option[text="Domains Num"]').css('display','none'); OR $('#test').find('option[text="Domains Num"]').hide();
option2)
$('#mySelect option:contains(' + value + ')').css('display','none');
In your Js file or footer.php page
Upvotes: 1