71fccd6a07
This bug was introduced in #26260. The sequence is: 1. WC_Query::adjust_posts_count runs, to handle found_posts filter, this indirectly executes wc_setup_loop. 2. At this point $GLOBALS['wp_query']->max_num_pages hasn't been set yet, and has a value of 0. Thus the loop variable total_pages is set to 0. 3. Later wc_setup_loop runs again and this time $GLOBALS['wp_query']->max_num_pages is already set, but since the loop variable total_pages already exists, it keeps its value of 0. 4. The pagination controls never show if total_pages is less than 2. The fix consists of hooking into the_posts to set the value of total_pages again, at that point $GLOBALS['wp_query']->max_num_pages is already set. |
||
---|---|---|
.. | ||
data | ||
framework | ||
includes | ||
unit-tests | ||
bootstrap.php | ||
classes-with-mockable-static-methods.php | ||
mockable-functions.php |