Skip to content
Docs
Get RestroPress

Action

rpress_insert_payment_note

Updated
On this page

Fires after a payment note has been added to an order.

Runs in rpress_insert_payment_note() after the note has been stored as a comment of type rpress_payment_note. The note is attributed to the current user in the admin and to no user elsewhere.

Parameters#

ParameterTypeDescription
$note_idintThe ID of the new note (comment).
$payment_idintThe payment (order) ID.
$notestringThe note text.

Example#

add_action( 'rpress_insert_payment_note', 'my_after_payment_note', 10, 3 );
function my_after_payment_note( $note_id, $payment_id, $note ) {
	update_comment_meta( $note_id, '_my_note_source', 'restropress' );
}

Source#

Fired from:

  • includes/payments/functions.php (line 1730), in rpress_insert_payment_note()

See also#

Was this page helpful?