woocommerce/tests/legacy/unit-tests/util
Nestor Soriano 71fccd6a07 Fix: pagination controls not displaying in products list.
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.
2020-07-31 16:40:25 +02:00
..
api-functions.php Improvements on the code hacker. 2020-05-20 09:56:26 +02:00
class-wc-rate-limiter.php Moved PHPUnit suite into tests/legacy 2020-04-24 13:53:40 -07:00
class-wc-tests-core-functions.php Moved unit tests to the new location. 2020-05-28 11:18:47 +02:00
class-wc-tests-user-functions.php Moved PHPUnit suite into tests/legacy 2020-04-24 13:53:40 -07:00
class-wc-tests-wc-query.php Fix: pagination controls not displaying in products list. 2020-07-31 16:40:25 +02:00
conditional-functions.php Moved PHPUnit suite into tests/legacy 2020-04-24 13:53:40 -07:00
deprecated-hooks.php Moved PHPUnit suite into tests/legacy 2020-04-24 13:53:40 -07:00
dummy-wc-logger.php Moved PHPUnit suite into tests/legacy 2020-04-24 13:53:40 -07:00
install.php Disabled flaky test 2020-07-01 19:09:50 +05:30
notice-functions.php Moved PHPUnit suite into tests/legacy 2020-04-24 13:53:40 -07:00
plugin-updates.php Moved PHPUnit suite into tests/legacy 2020-04-24 13:53:40 -07:00
validation.php Moved PHPUnit suite into tests/legacy 2020-04-24 13:53:40 -07:00