Skip to content
Docs
Get RestroPress

Action

rpress_pre_insert_payment_note

Updated
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#

ParameterTypeDescription
$payment_idintThe payment (order) ID.
$notestringThe 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), in rpress_insert_payment_note()

See also#

Was this page helpful?