Skip to content
Docs
Get RestroPress

Action

rpress_post_edit_customer

Updated
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#

ParameterTypeDescription
$customer_idintThe customer ID that was edited.
$customer_dataarrayThe 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), in rpress_edit_customer()

See also#

Was this page helpful?