Action
rpress_account_hub_address_saved
On this page
Fires after a customer address is added or updated in the account hub.
Runs at the end of rpress_account_hub_save_address(), after the address list is stored and the default address has been set when needed. It fires for saves from the account page request handler and for addresses copied from an order when the checkout save-address option was ticked.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$user_id | int | User ID. |
$index | int | Index of the saved address in the user's address list. |
$address | array | The sanitised address that was stored. |
Example#
add_action( 'rpress_account_hub_address_saved', 'my_address_saved', 10, 3 );
function my_address_saved( $user_id, $index, $address ) {
update_user_meta( $user_id, '_my_last_saved_city', $address['city'] );
}
Source#
Fired from:
includes/features/account-hub/addresses.php(line 214), inrpress_account_hub_save_address()
See also#
Was this page helpful?
