Filter
rpress_set_payment_transaction_id
On this page
Filters the transaction ID before it is saved on a payment.
Runs in rpress_set_payment_transaction_id() when both a payment ID and a transaction ID are provided, before the value is saved to the _rpress_payment_transaction_id meta key. Gateways call this function to record the processor's reference.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$transaction_id | string | The transaction ID to store. |
$payment_id | int | The payment (order) ID. |
Return value#
string. The transaction ID to store.
Example#
add_filter( 'rpress_set_payment_transaction_id', 'my_trim_transaction_id', 10, 2 );
function my_trim_transaction_id( $transaction_id, $payment_id ) {
return trim( $transaction_id );
}
Source#
Applied in:
includes/payments/functions.php(line 1643), inrpress_set_payment_transaction_id()
See also#
Was this page helpful?
