Action
rpress_customer_pre_add_note
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#
| Parameter | Type | Description |
|---|---|---|
$new_note | string | The formatted note that will be stored. |
$customer_id | int | The customer ID. |
$customer | RPRESS_Customer | The 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), inRPRESS_Customer::add_note()
See also#
Was this page helpful?
