Issue with WooCommerce Attribute Filters Showing Out-of-Stock Variations

This topic has 6 replies, 3 voices, and was last updated 3 weeks, 3 days ago ago by Tony Rodriguez

  • Avatar: Sega
    Sega
    Participant
    November 10, 2025 at 08:55

    I am experiencing a problem with the product filters on our WooCommerce shop using XStore. When filtering by product attributes (e.g., size, color, season), the filters do not respect stock status correctly.

    Current behavior:

    A product is displayed in the filtered results even if the specific variation selected by the filter is out of stock.

    For example, if a product has two size variations, one in stock and one out of stock, and the user selects the out-of-stock size, the product still appears.

    If multiple filters are selected (e.g., sizes 37 and 38), the filter logic behaves inconsistently and may return products even if none of the selected variations are actually in stock.

    Expected behavior:

    Products should only appear if there is at least one variation in stock that matches the selected filter(s).

    Out-of-stock variations should be excluded from the filtered results.

    Multiple filters should work using OR logic across variations, so if at least one variation meets the selected criteria, the product is shown.

    Additional notes:

    I am using custom pre_get_posts hooks to try to fix this, but the default XStore attribute filters do not handle this correctly out of the box.

    The issue is affecting filters for attributes like pa_razmer (size), pa_tsvet (color), and pa_sezon (season).

    Please advise on a solution or update to ensure that attribute filters only show products with available variations matching the selected criteria.

    Please, contact administrator
    for this information.
    5 Answers
    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    November 10, 2025 at 09:51

    Hello, Sega,

    Thank you for the detailed explanation – we fully understand what you’re describing.

    You’re referring to the current behavior of the XStore product filters when applied to variable products, where:
    • The filter returns a product if any of its variations exist – even if the specific variation that matches the selected attribute (for example, size or color) is out of stock.
    • You’d like the filter to return products only if there’s at least one matching variation in stock for the selected attribute(s).

    That makes perfect sense from a user’s perspective – it’s a logical request and indeed could improve how attribute-based filtering works in certain stores.
    However, the current XStore filtering logic is intentionally designed to show a variable product if at least one variation is in stock, even if some variations are not. This prevents other customers from losing visibility of products that may still have available options.

    Changing this logic globally could break filtering behavior for other users who rely on the existing approach.

    At this point, there are two ways forward:
    1. Feature request:
    You can submit this idea via the XStore Dashboard → Feature Requests section. If it receives enough votes from the community, our team will consider adding it as an optional filter mode in a future update. https://www.8theme.com/taskboard/

    2. Custom solution:
    If you need this behavior specifically for your site, we recommend reaching out to our customization partners at WP Kraken. They can adjust the filtering logic for your particular setup without affecting the global theme behavior.

    We appreciate your feedback – ideas like this help us make XStore more flexible for different store needs.

    Best Regards,
    8Theme’s Team

    Please contact administrator
    for this information.
    Avatar: Sega
    Sega
    Participant
    November 10, 2025 at 18:22

    Hello!
    It would be great to have native setting like “Hide out of stock product”
    in other hands I have solved it by adding code from previous message.
    thank you for your answer!

    Avatar: Andrew Mitchell
    Andrew Mitchell
    Support staff
    November 10, 2025 at 19:48

    Dear Sega,

    Thank you for your suggestion. We appreciate your feedback regarding the option to have a native setting for “Hide out of stock products.”

    It’s great to hear that you have found a temporary solution by adding custom code. We will consider your request for future updates to improve the theme’s functionality.

    Best Regards,
    8Theme’s Team

    Avatar: Sega
    Sega
    Participant
    November 11, 2025 at 06:16

    Thanks for the support! My topic “Issue with WooCommerce Attribute Filters Showing Out-of-Stock Variations” has been successfully resolved.

    Avatar: Tony Rodriguez
    Tony Rodriguez
    Support staff
    November 11, 2025 at 06:16

    Dear Sega,

    Thanks for being part of our WordPress & WooCommerce community!

    We’re happy we could assist you. Your feedback truly matters — it helps us make XStore better, faster, and more reliable with every release.

    Together, we’re shaping a better WooCommerce experience for everyone.

    Topic closed.
    The 8Theme Team

  • Viewing 6 results - 1 through 6 (of 6 total)

The issue related to '‘Issue with WooCommerce Attribute Filters Showing Out-of-Stock Variations’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.