• Resolved theanciento

    (@theanciento)


    I used a bulk editor to change miss-set product with 0 inventory from In Stock to Out of Stock. This worked fine, however the products that should display, display weird in the store. A category for example with 24 products after changes, still show the same amount of the original amount of 29, displaying “Showing 25–29 of 29 results” instead of Showing 21-24 which is what it should show. it also shows 10 products on the first page, 11 on the second, and 3 on the third

    Is there a cache that I need to clear? Is this a Transient issue?

    • This topic was modified 2 years, 11 months ago by theanciento.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Hannah S.L.

    (@fernashes)

    Automattic Happiness Engineer

    Hey there,

    The first most likely problem here is caching – so I’d recommend disabling any caching plugins that are enabled and then checking to make sure the correct number of products are displayed.

    The next thing to do is indeed check on things like transients. Here’s a good overview of the options:
    https://wordpress.org/support/topic/uncategorized-showing-wrong-product-count/

    Can you please let me know how that goes?

    Thread Starter theanciento

    (@theanciento)

    Hey there Hannah,

    Thanks for the help.

    I tried as you suggested and that didn’t work.

    I went to the link and added a product as described and that didn’t work.

    I tried deactivating all my plugins, and that didn’t work. I use no cache plugins.

    I went in to customize and set number of products across and number of rows up 1 to 4 across and 5 rows and it still displays wrong, showing me 17 products instead of 20(4 products x 5 rows) but thinks there are 20 per the Showing 1–20 of 29 results at the top of the page, so I feel like there is a cache out there I need to clear but still can’t find it.

    After further investigation if you go to Woocommerce > Products > Inventory and if you check the box for Out of stock visibility to Hide out of stock items from the catalog, it appears that it still thinks that it is showing out of stock product with the product count at the top of the page and the number it think are on each page. They are removed though. Same behavior in different browsers so I know it’s not a crazy browser cache thing.

    Any ideas?

    Thanks. E

    • This reply was modified 2 years, 11 months ago by theanciento.
    Plugin Support Hannah S.L.

    (@fernashes)

    Automattic Happiness Engineer

    Hey there,

    Thanks for all of that info!

    I tried deactivating all my plugins, and that didn’t work.

    That’s part of a conflict test – the other half is to disable all plugins and then also switch themes. That’ll tell you for sure if there’s a conflict happening. I don’t think it’s likely here, but it’s always a possibility.

    After further investigation if you go to Woocommerce > Products > Inventory and if you check the box for Out of stock visibility to Hide out of stock items from the catalog, it appears that it still thinks that it is showing out of stock product with the product count at the top of the page and the number it think are on each page.

    This is sounding more and more like caching – but then caching at host level, as you’ve already ruled out browser and site level. Your next best option is to contact your host and see what kind of caching they are doing on your site.

    Thread Starter theanciento

    (@theanciento)

    Hey Hannah,

    Nothing seemed to fix this, and going back a few database backups this has been an issue for me for awhile. I got this from Github and it fixed it.

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

    add_action(‘woocommerce_product_query’, ‘show_only_instock_products’);

    function show_only_instock_products($query) {
    $meta_query = $query->get( ‘meta_query’ );
    $meta_query[] = array(
    ‘key’ => ‘_stock_status’,
    ‘compare’ => ‘=’,
    ‘value’ => ‘instock’
    );
    $query->set( ‘meta_query’, $meta_query );
    }`

    Thanks again for all your help. E

    Plugin Support Hannah S.L.

    (@fernashes)

    Automattic Happiness Engineer

    Hey there,

    I’m glad you found a fix – thank you for sharing it!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘woocommerce products display weird after bulk edits’ is closed to new replies.