Skip to content
Docs
Get RestroPress

Filter

rpress_customer_add_note_string

Updated
On this page

Filters the formatted note string before it is appended to a customer.

Runs in RPRESS_Customer::add_note(). The string is the current local date and time, a dash and the note text, and it is appended to the stored notes separated by a blank line. The filtered string is also what the pre and post note actions receive and what add_note() returns.

Parameters#

ParameterTypeDescription
$note_stringstringDate-prefixed note text.

Return value#

string. The note string to store.

Example#

function my_customer_add_note_string( $note_string ) {
	return $note_string . ' (' . wp_get_current_user()->user_login . ')';
}
add_filter( 'rpress_customer_add_note_string', 'my_customer_add_note_string' );

Source#

Applied in:

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

See also#

Was this page helpful?