Skip to content
Docs
Get RestroPress

Filter

rpress_discount_status_cleanup_count

Updated
On this page

Filters how many discounts are checked per run of the discount status cleanup.

Applied in rpress_discount_status_cleanup(), which marks discounts that reached their maximum uses or expired as inactive or expired. The value is used as posts_per_page in the discount queries. The default is 25.

Parameters#

ParameterTypeDescription
$valueintDefault number of discounts per query.

Return value#

int. Number of discounts to process.

Example#

function my_discount_cleanup_count( $count ) {
	return 100;
}
add_filter( 'rpress_discount_status_cleanup_count', 'my_discount_cleanup_count' );

Source#

Applied in:

  • includes/discount-functions.php (line 967), in rpress_discount_status_cleanup()

See also#

Was this page helpful?