Using the plugin WOOF – Woocommerce product filter causes error: “admin-ajax.php?paged=2” & no result shown from page 2.

Ex: After filtering products with specific attribute, it only shows maximum of 15 products (the result has 20 products). The remaining 5 products will be shown on page 2 but when we move to page 2, nothing is shown except “0”.

Reason:

– Following the author “realmag777 “, its a js error on the shop page and no solution found.

– Following Stack overflow: WooCommerce pagination works based on global $wp_query variable. But you are using your own $query variable. That’s why it is obvious why it is not working.

Solution:

Easy solution (tested & worked): Turn off ajaxify the shop & no tick to optimize WOOF (js to footer).

from stack overflow:

You have 2 ways to go, first is using query_posts instead of WP_QUERY class. Second way is small hack, where you can cheat $wp_query pagination argument.

Here it is:

 global $wp_query;
  $wp_query->max_num_pages=$query->max_num_pages;
  // TODO - get pagination working
  woocommerce_pagination();

Source: https://stackoverflow.com/questions/50921965/woocommerce-pagination-ajax-wp-query