woocommerce_created_customer
Fires after a customer account has been registered.
This hook fires after customer accounts are created and passes the customer data.
Использование
add_action( 'woocommerce_created_customer', 'wp_kama_woocommerce_created_customer_action', 10, 3 ); /** * Function for `woocommerce_created_customer` action-hook. * * @param integer $customer_id New customer (user) ID. * @param array $new_customer_data Array of customer (user) data. * @param string $password_generated The generated password for the account. * * @return void */ function wp_kama_woocommerce_created_customer_action( $customer_id, $new_customer_data, $password_generated ){ // action... }
- $customer_id(int)
- New customer (user) ID.
- $new_customer_data(массив)
- Array of customer (user) data.
- $password_generated(строка)
- The generated password for the account.
Список изменений
С версии 7.2.0 | Введена. |
Где вызывается хук
woocommerce_created_customer
woocommerce/includes/wc-user-functions.php 197
do_action( 'woocommerce_created_customer', $customer_id, $new_customer_data, $password_generated );