Describe the bug
The Network Admin payments search sometimes returns no matching records.
To reproduce
- Load network admin payments
- Search for a payment
- See we never* paid it
(We did, it's just not returning)
Expected behavior
It should list the payment we're looking for...
Why
The payments dashboard is run off a payments_index table which is rebuilt daily through a truncate / re-insert.
If the search activity happens during this rebuild, the search will return no results:
|
// Truncate existing table. |
|
$wpdb->query( 'TRUNCATE TABLE ' . self::get_table_name() ); |
What should happen instead, is that the rows should be updated / replaced / removed as needed, rather than just building it fresh daily.
cc @harmonyromo
Describe the bug
The Network Admin payments search sometimes returns no matching records.
To reproduce
(We did, it's just not returning)
Expected behavior
It should list the payment we're looking for...
Why
The payments dashboard is run off a
payments_indextable which is rebuilt daily through a truncate / re-insert.If the search activity happens during this rebuild, the search will return no results:
wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network/includes/payment-requests-dashboard.php
Lines 101 to 102 in ce161fb
What should happen instead, is that the rows should be updated / replaced / removed as needed, rather than just building it fresh daily.
cc @harmonyromo