Action
rpress_pre_customer_disconnect_user_id
On this page
Fires before a customer is disconnected from their linked WordPress user.
Runs in rpress_disconnect_customer_user_id() after nonce and capability checks and before the customer's user_id is set to 0. The second argument is the user ID that is about to be unlinked.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$customer_id | int | The customer ID. |
$user_id | int | The WordPress user ID currently linked to the customer. |
Example#
function my_before_disconnect( $customer_id, $user_id ) {
update_option( 'my_last_disconnected_user', (int) $user_id );
}
add_action( 'rpress_pre_customer_disconnect_user_id', 'my_before_disconnect', 10, 2 );
Source#
Fired from:
includes/admin/customers/customer-actions.php(line 673), inrpress_disconnect_customer_user_id()
See also#
Was this page helpful?
