• We noticed big bug in product archive pages.

    By default we set woocommerce to hide the products that are out of stock.

    The products are hidden, but instead of going directly to the next product that is ON stock, product archive pages show empty space for out of stock products.
    Also noticed the out of stock products are being counted in info (showing x out of xx results)

    Our shop has more than 5.5K products, of which we have around 3.8K on stock.

    Or to summarize:
    In settings we set to hide out of stock products, they are being counted and displayed with blank space in product archives.

    P/S
    In WC 2.6 the loop and count was automatically skipping these products.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    Visibility is controlled by a taxonomy in 3.0 – product_visibility. If you have custom code or a plugin changing the main query, but using the old meta way of filtering, it may not work how it should.

    e.g. the code snippet to filter exclude a category breaks this I know for certain.

    Thread Starter centuri

    (@centurimk)

    I know the visibility is done with taxonomy in new version.

    Also tried last night to disable all plugins to see if there is any conflict.
    But the problem persists.

    Actualy I had this to exclude category>

    add_filter( 'woocommerce_product_categories_widget_args', 'woo_product_cat_widget_args' );  
    function woo_product_cat_widget_args( $cat_args ) {  
    $cat_args['exclude'] = array('2890');  
    return $cat_args;  
    };*/

    Removed it but the problem is still there
    Any idea how to fix this?

    • This reply was modified 7 years, 7 months ago by centuri.
    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    Same for theme?

    It has to be something on the site or I’d see the same problem on my test site – they all use the same wp_query. I could take a look after you rule out theme but you’d need to reach me on wp slack since you cannot provide access over a forum.

    Thread Starter centuri

    (@centurimk)

    The same theme on the test site with the same plugins, is OK.

    It’s DIVI theme from elegant themes.

    BIG THNX for offering to look.
    How do we do this wp slack thing, never used it before?

    UPDATE!
    I installed slack and sent you a message.

    • This reply was modified 7 years, 7 months ago by centuri.

    Hi. I have this exact same issue.

    How did you fix it?

    Thread Starter centuri

    (@centurimk)

    https://github.com/woocommerce/woocommerce/issues/14147

    It was fixed by deleting some products that had wrong ID for out of stock.

    Thanks for your reply. I’m not entirely sure what the’wrong ID’ means though.

    We have over 5k stock too and set the instock or out of stock value by importing a CSV.

    I had to something because the issue breaks the ‘sort products by’ function & dramatically alters page lengths making the store unprofessional (no one will buy from an online store with obvious display issues!).

    So I ran the CSVs and deleted all out of stock items (approx 800+ of them). Will have to re-create & delete stock items till woocommerce fixes this bug.

    I am getting this same issue as well. Any update on this?

    I remember reading that WC3.0 dramatically sped up displaying pages when the “hide out of stock” feature is used but what good is it when the display is broken and not showing the next in stock item but instead leaving a gap?!

    Anyone?

    My only workaround is to delete the out of stock products but that is no go for SEO having them disappear and appear all the time!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘BUG in product archive pages with WC3.01’ is closed to new replies.