Skip to content
Docs
Get RestroPress

Filter

rpress_recount_earnings_args

Updated
On this page

Filters the query arguments used to fetch payments when recalculating store earnings.

Runs on every step of the Recalculate Store Earnings tool. The array is passed to rpress_get_payments() and contains number, page, status and fields, where status is the list from rpress_recount_accepted_statuses. The amounts of the returned payments are added to the stored earnings total.

Parameters#

ParameterTypeDescription
$argsarrayArguments for rpress_get_payments: number, page, status and fields.

Return value#

array. The modified query arguments.

Example#

function my_recount_earnings_args( $args ) {
	$args['start_date'] = '2024-01-01';
	return $args;
}
add_filter( 'rpress_recount_earnings_args', 'my_recount_earnings_args' );

Source#

Applied in:

  • includes/admin/tools/class-rpress-tools-recount-store-earnings.php (line 57), in RPRESS_Tools_Recount_Store_Earnings::get_data()

See also#

Was this page helpful?