Skip to content
Docs
Get RestroPress

Action

rpress_customer_pre_add_note

Updated
On this page

Fires before a note is added to a customer.

Fires in RPRESS_Customer::add_note() after the note string has been built and filtered, before the notes column is updated.

Parameters#

ParameterTypeDescription
$new_notestringThe formatted note that will be stored.
$customer_idintThe customer ID.
$customerRPRESS_CustomerThe customer object.

Example#

function my_customer_pre_add_note( $new_note, $customer_id, $customer ) {
	error_log( 'Note for customer ' . $customer_id . ': ' . $new_note );
}
add_action( 'rpress_customer_pre_add_note', 'my_customer_pre_add_note', 10, 3 );

Source#

Fired from:

  • includes/class-rpress-customer.php (line 565), in RPRESS_Customer::add_note()

See also#

Was this page helpful?