Skip to content
Docs
Get RestroPress

Filter

rpress_get_earnings_by_date_args

Updated
On this page

Filters the query arguments used by the deprecated rpress_get_earnings_by_date().

Applied in the deprecated rpress_get_earnings_by_date() after the arguments are built and before get_posts() runs. The array contains post_type (rpress_payment), nopaging, year, monthnum, post_status, fields, update_post_term_cache and include_taxes, plus day and hour when given. The arguments also form the cache key for the rpress_stats_earnings transient.

Parameters#

ParameterTypeDescription
$argsarrayThe get_posts() arguments used to find payments in the period.

Return value#

array. The modified arguments.

Example#

function my_earnings_args( $args ) {
	$args['post_status'] = array( 'publish' );
	return $args;
}
add_filter( 'rpress_get_earnings_by_date_args', 'my_earnings_args' );

Notes#

Deprecated since 2.7. Use RPRESS_Payment_Stats()->get_earnings() instead.

Source#

Applied in:

  • includes/deprecated-functions.php (line 368), in rpress_get_earnings_by_date()

See also#

Was this page helpful?