Filter
rpress_get_next_payment_number
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#
| Parameter | Type | Description |
|---|---|---|
$number | int|string | The 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), inrpress_get_next_payment_number()
See also#
Was this page helpful?
