Action
rpress_pre_insert_payment_note
On this page
Fires before a payment note is added to an order.
Runs in rpress_insert_payment_note() after the payment ID has been checked as non-empty and before the note is stored as a comment of type rpress_payment_note.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$payment_id | int | The payment (order) ID. |
$note | string | The note text to be stored. |
Example#
add_action( 'rpress_pre_insert_payment_note', 'my_log_payment_note_attempt', 10, 2 );
function my_log_payment_note_attempt( $payment_id, $note ) {
error_log( sprintf( 'Adding note to order %d: %s', $payment_id, $note ) );
}
Source#
Fired from:
includes/payments/functions.php(line 1715), inrpress_insert_payment_note()
See also#
Was this page helpful?
