All product variations are shown on the front-end

Forums Variations Radio Buttons for WooCommerce All product variations are shown on the front-end

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #94149
    tychesoftwares
    Participant

    Hi Jeremy,

    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:

    Merge attributes enabled: https://prnt.sc/uxrbuy
    Merge attributes disabled: https://prnt.sc/uxrcsm

    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.

    :Vishal

    #94150
    Jeremy Tyarks
    Participant

    Hi Vishal,

    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!

    Best,
    Jeremy

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Variations Radio Buttons for WooCommerce’ is closed to new topics and replies.