← All changes
|
includes/admin/tools/data/class-give-tools-delete-import-donors.php
+21
-15
2.3.2
→
4.17.0
View file →
| @@ -206,17 +206,20 @@ | ||
| 206 | 206 | |
| 207 | 207 | /** |
| 208 | 208 | * Filter add to alter the argument before the wp quest run |
| 209 | 209 | */ |
| 210 | - $args = apply_filters( 'give_tools_reset_stats_total_args', array( | |
| 211 | - 'post_type' => 'give_payment', | |
| 212 | - 'post_status' => 'any', | |
| 213 | - 'posts_per_page' => $this->per_step, | |
| 214 | - 'paged' => $paged, | |
| 215 | - 'meta_key' => '_give_payment_import', | |
| 216 | - 'meta_value_num' => 1, | |
| 217 | - 'meta_compare' => '=', | |
| 218 | - ) ); | |
| 210 | + $args = apply_filters( | |
| 211 | + 'give_tools_reset_stats_total_args', | |
| 212 | + array( | |
| 213 | + 'post_type' => 'give_payment', | |
| 214 | + 'post_status' => 'any', | |
| 215 | + 'posts_per_page' => $this->per_step, | |
| 216 | + 'paged' => $paged, | |
| 217 | + 'meta_key' => '_give_payment_import', | |
| 218 | + 'meta_value_num' => 1, | |
| 219 | + 'meta_compare' => '=', | |
| 220 | + ) | |
| 221 | + ); | |
| 219 | 222 | |
| 220 | 223 | // Reset the post data. |
| 221 | 224 | wp_reset_postdata(); |
| 222 | 225 | |
| @@ -424,13 +427,16 @@ | ||
| 424 | 427 | $this->total_step = ( ( count( $donation_ids ) / $this->per_step ) * 2 ) + count( $donor_ids ); |
| 425 | 428 | $this->step_completed = $page + ( count( $donation_ids ) / $this->per_step ); |
| 426 | 429 | |
| 427 | 430 | if ( ! empty( $donor_ids[ $page ] ) ) { |
| 428 | - $args = apply_filters( 'give_tools_reset_stats_total_args', array( | |
| 429 | - 'post_status' => 'any', | |
| 430 | - 'posts_per_page' => 1, | |
| 431 | - 'author' => $donor_ids[ $page ], | |
| 432 | - ) ); | |
| 431 | + $args = apply_filters( | |
| 432 | + 'give_tools_reset_stats_total_args', | |
| 433 | + array( | |
| 434 | + 'post_status' => 'any', | |
| 435 | + 'posts_per_page' => 1, | |
| 436 | + 'author' => $donor_ids[ $page ], | |
| 437 | + ) | |
| 438 | + ); | |
| 433 | 439 | |
| 434 | 440 | $donations = array(); |
| 435 | 441 | $payments = new Give_Payments_Query( $args ); |
| 436 | 442 | $payments = $payments->get_payments(); |
| @@ -575,9 +581,9 @@ | ||
| 575 | 581 | * Unset the properties specific to the donors export. |
| 576 | 582 | * |
| 577 | 583 | * @since 2.3.0 |
| 578 | 584 | * |
| 579 | - * @param array $request | |
| 585 | + * @param array $request | |
| 580 | 586 | * @param Give_Batch_Export $export |
| 581 | 587 | */ |
| 582 | 588 | public function unset_properties( $request, $export ) { |
| 583 | 589 | if ( $export->done ) { |