Skip to content
Docs
Get RestroPress

Filter

rpress_get_next_payment_number

Updated
On this page

Filters the next sequential order number.

Runs at the end of rpress_get_next_payment_number(), after the stored last number has been incremented where required. It is used when a new payment is inserted and sequential order numbers are enabled. When sequential numbering is off the function returns false without applying this filter.

Parameters#

ParameterTypeDescription
$numberint|stringThe next order number.

Return value#

int|string. The order number to assign.

Example#

add_filter( 'rpress_get_next_payment_number', 'my_skip_unlucky_number', 10, 1 );
function my_skip_unlucky_number( $number ) {
	if ( 13 === (int) $number ) {
		return 14;
	}
	return $number;
}

Source#

Applied in:

  • includes/payments/functions.php (line 1492), in rpress_get_next_payment_number()

See also#

Was this page helpful?