Action
rpress_post_edit_customer
On this page
Fires after a customer record has been updated from the admin Edit Customer form.
Runs in rpress_edit_customer() after the update attempt, before the response is sent. On success $customer_data has been merged with the address fields. Fires even when the update failed, so check the stored customer if you need to know the outcome.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$customer_id | int | The customer ID that was edited. |
$customer_data | array | The sanitized customer fields, merged with the address when the update succeeded. |
Example#
function my_after_customer_edit( $customer_id, $customer_data ) {
delete_transient( 'my_customer_summary_' . $customer_id );
}
add_action( 'rpress_post_edit_customer', 'my_after_customer_edit', 10, 2 );
Notes#
The update result is not passed to the callback; fires on both AJAX and non-AJAX requests.
Source#
Fired from:
includes/admin/customers/customer-actions.php(line 127), inrpress_edit_customer()
See also#
Was this page helpful?
