- Support forum for the Variations Radio Buttons for WooCommerce.
- September 24, 2020 at 7:12 pm #94148Jeremy TyarksParticipant
I’m not certain if this is a bug, or the expected behavior, but when “Merge attributes” is disabled, all product variations are shown on the front-end, even if they’re not enabled within the product. (I.e., When editing a product’s variation, there are four checkboxes: “Enabled,” “Downloadable,” “Virtual,” and “Manage stock?” When “Enabled” is unchecked, and the Variations Radio Buttons for WooCommerce plugin is disabled, these options *do not* show up in the select menus the front-end. However, when the Variations Radio Buttons for WooCommerce plugin is enabled, those options *do* show up.)
* When “Merge attributes” is checked, disabled variations are hidden as expected.
* This is using WordPress 5.5.1, WooCommerce version 4.5.2 and Variations Radio Buttons for WooCommerce Pro version 2.3.3.
If this is the expected behavior, is there a filter that can be applied to ignore disabled variations? If this is bug, do you happen to have any idea when it could/will be fixed?
If you need any additional information, please don’t hesitate to reach out.
Thank you!October 12, 2020 at 1:04 pm #94149tychesoftwaresParticipant
My apologies for the delay in replying to this one. I checked the issue & it does look like a bug. However, I am not sure about the fix for this. Because the variation is not “Enabled”, that means it could be a combination of attributes.
However, that attribute may be “Enabled” for another combination. For example:
So the combination of Color: Blue & Logo: Yes is disabled.
The only way to hide this is when the Color Blue is selected, then at that time the disabled variations with that attribute should be hidden. Is that how you anticipate this to work?
Currently, we don’t have a filter to hide the disabled variations. It will have to be fixed.
:VishalOctober 14, 2020 at 5:06 pm #94150Jeremy TyarksParticipant
Thanks so much for looking into this, and, yes, I understand how this could be difficult to implement because of how different attribute combinations are possible.
Forgive me if this isn’t helpful, but I do see that WooCommerce added a ‘woocommerce_hide_invisible_variations’ filter in the get_available_variations() function inside class-wc-product-variable.php. Given that it does work with the default select menus, I’m wondering if they’re using that filter to do so?
The site I’m working on has a few variations that are only available *sometimes*. They don’t want to have to remove the variations because of the data that they’ve added, but they also don’t want them to surface on the front-end as “out of stock.”
In one case, https://prnt.sc/uzb7mw, the “EHR-1209” size is disabled across the board. So, the proposed solution of hiding at the time of selection wouldn’t work because it should always be hidden.
I know this is a frustrating one, thanks again for looking into it!
- You must be logged in to reply to this topic.