Filter
rpress_sales_by_date_show_free
On this page
Filters whether free orders are included by the deprecated rpress_get_sales_by_date().
Applied in the deprecated rpress_get_sales_by_date() before the query is finalised. Returning exactly false adds a meta query that restricts results to payments whose _rpress_payment_total is greater than zero. Any other value includes free orders.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$value | bool | Default value, true, meaning free orders are included. |
$args | array | The query arguments built so far. |
Return value#
bool. False to exclude free orders, anything else to include them.
Example#
function my_sales_hide_free( $show_free, $args ) {
return false;
}
add_filter( 'rpress_sales_by_date_show_free', 'my_sales_hide_free', 10, 2 );
Notes#
Deprecated since 2.7. Use RPRESS_Payment_Stats()->get_sales() instead.
Source#
Applied in:
includes/deprecated-functions.php(line 425), inrpress_get_sales_by_date()
See also#
Was this page helpful?
