Filter
rpress_recount_customer_payment_statuses
On this page
Filters the payment statuses used when recalculating customer stats.
Runs when the customer stats recalculation fetches each customer's payments. The default is every key returned by rpress_get_payment_status_keys(). The list is passed as the status argument of rpress_get_payments(). Per-payment inclusion in value and count is then decided by rpress_customer_recount_should_process_payment.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$statuses | array | Payment status keys to load. Default is all payment status keys. |
Return value#
array. The list of payment status keys.
Example#
function my_recount_customer_payment_statuses( $statuses ) {
return array_diff( $statuses, array( 'failed' ) );
}
add_filter( 'rpress_recount_customer_payment_statuses', 'my_recount_customer_payment_statuses' );
Notes#
Fired from RPRESS_Tools_Recount_Customer_Stats and RPRESS_Tools_Recount_Single_Customer_Stats.
Source#
Applied in:
includes/admin/tools/class-rpress-tools-recount-customer-stats.php(line 55), inRPRESS_Tools_Recount_Customer_Stats::get_data()includes/admin/tools/class-rpress-tools-recount-single-customer-stats.php(line 176), inRPRESS_Tools_Recount_Single_Customer_Stats::pre_fetch()
See also#
Was this page helpful?
