Skip to content
Docs
Get RestroPress

Action

rpress_customer_pre_update

Updated
On this page

Fires before a customer record is updated.

Fires in RPRESS_Customer::update() after the supplied columns have been sanitized and before they are written to the database.

Parameters#

ParameterTypeDescription
$customer_idintThe customer ID.
$dataarraySanitized column values that will be written.

Example#

function my_customer_pre_update( $customer_id, $data ) {
	if ( isset( $data['email'] ) ) {
		error_log( 'Customer ' . $customer_id . ' email changing to ' . $data['email'] );
	}
}
add_action( 'rpress_customer_pre_update', 'my_customer_pre_update', 10, 2 );

Source#

Fired from:

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

See also#

Was this page helpful?