Skip to content
Docs
Get RestroPress

Action

rpress_customer_post_add_note

Updated
On this page

Fires after a note is added to a customer.

Fires in RPRESS_Customer::add_note() after the notes column update attempt. The first argument is the customer's parsed notes (newest first, limited to the default page length).

Parameters#

ParameterTypeDescription
$notesarrayThe customer's parsed notes as an array of strings.
$new_notestringThe formatted note that was added.
$customer_idintThe customer ID.
$customerRPRESS_CustomerThe customer object.

Example#

function my_customer_post_add_note( $notes, $new_note, $customer_id, $customer ) {
	delete_transient( 'my_customer_notes_' . $customer_id );
}
add_action( 'rpress_customer_post_add_note', 'my_customer_post_add_note', 10, 4 );

Source#

Fired from:

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

See also#

Was this page helpful?