Support » Plugin: WooCommerce » Ensure that products per page is consistent

  • Resolved TecBrat

    (@tecbrat)


    Woocommerce Version 3.0.7

    I found and followed the directions here:
    https://docs.woocommerce.com/document/change-number-of-products-displayed-per-page/

    // Display 24 products per page. Goes in functions.php
    add_filter( 'loop_shop_per_page', create_function( '$cols', 'return 24;' ), 20 );

    It works, almost.

    The site where I’m using it has a lot of sold out items. It seems like the sold out items are counted in the loop, leaving fewer than expected to display on the page.

    I’m looking for a way to consistently display the chosen number of items per page, except of course the last page.

Viewing 2 replies - 1 through 2 (of 2 total)
  • PhilDyp

    (@phildyp)

    I’ve got the same problem with my store since update @tecbrat
    I wrote about it here https://github.com/woocommerce/woocommerce/issues/15114#issuecomment-302098218

    Haven’t found a solution yet.. So +1 on this!

    TecBrat

    (@tecbrat)

    @phildyp,
    Thanks for the link. At that link, mikejolley asked “Did you run the data upgrade after upgrading…?”

    When I went back into my shopping cart, I saw a button that suggested I do a data update. I clicked that button and it started to work in the background but gave a link to force it to run immediately. I clicked that link.

    As far as I can tell, it fixed my problem.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Ensure that products per page is consistent’ is closed to new replies.