Filter
rpress_recount_accepted_statuses
On this page
Filters the payment statuses counted when recalculating stats.
Runs in the Tools batch processors that recalculate store earnings, all menu item stats and single menu item stats. The default list is publish and revoked. Payments with a status in the list are included in the recalculated sales and earnings.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$statuses | array | Payment status slugs to include. Default is publish and revoked. |
Return value#
array. The list of payment status slugs.
Example#
function my_recount_accepted_statuses( $statuses ) {
$statuses[] = 'processing';
return $statuses;
}
add_filter( 'rpress_recount_accepted_statuses', 'my_recount_accepted_statuses' );
Notes#
Fired from several batch classes: Recount_All_Stats (get_data and pre_fetch), Recount_Download_Stats and Recount_Store_Earnings. Every call uses the same default and signature.
Source#
Applied in:
includes/admin/tools/class-rpress-tools-recount-all-stats.php(line 52), inRPRESS_Tools_Recount_All_Stats::get_data()includes/admin/tools/class-rpress-tools-recount-all-stats.php(line 230), inRPRESS_Tools_Recount_All_Stats::pre_fetch()includes/admin/tools/class-rpress-tools-recount-download-stats.php(line 49), inRPRESS_Tools_Recount_Download_Stats::get_data()includes/admin/tools/class-rpress-tools-recount-download-stats.php(line 145), inRPRESS_Tools_Recount_Download_Stats::get_percentage_complete()includes/admin/tools/class-rpress-tools-recount-store-earnings.php(line 56), inRPRESS_Tools_Recount_Store_Earnings::get_data()
See also#
Was this page helpful?
