Action
rpress_customer_pre_update
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#
| Parameter | Type | Description |
|---|---|---|
$customer_id | int | The customer ID. |
$data | array | Sanitized 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), inRPRESS_Customer::update()
See also#
Was this page helpful?
