Skip to content
Docs
Get RestroPress

Action

rpress_pre_delete_payment_note

Updated
On this page

Fires before a payment note is deleted.

Runs in rpress_delete_payment_note() before wp_delete_comment() permanently removes the note.

Parameters#

ParameterTypeDescription
$comment_idintThe note (comment) ID.
$payment_idintThe payment (order) ID.

Example#

add_action( 'rpress_pre_delete_payment_note', 'my_log_note_deletion', 10, 2 );
function my_log_note_deletion( $comment_id, $payment_id ) {
	error_log( sprintf( 'Deleting note %d from order %d', $comment_id, $payment_id ) );
}

Source#

Fired from:

  • includes/payments/functions.php (line 1744), in rpress_delete_payment_note()

See also#

Was this page helpful?