Skip to content
Docs
Get RestroPress

Action

rpress_account_hub_address_deleted

Updated
On this page

Fires after a customer address is deleted in the account hub.

Runs at the end of rpress_account_hub_delete_address(), after the address is removed and, if it was the default, another address has been made the default or the default meta cleared.

Parameters#

ParameterTypeDescription
$user_idintUser ID.
$indexintIndex of the deleted address.

Example#

add_action( 'rpress_account_hub_address_deleted', 'my_address_deleted', 10, 2 );
function my_address_deleted( $user_id, $index ) {
	delete_user_meta( $user_id, '_my_address_extra_' . $index );
}

Source#

Fired from:

  • includes/features/account-hub/addresses.php (line 288), in rpress_account_hub_delete_address()

See also#

Was this page helpful?