woocommerce_created_customer хук-событиеWC 7.2.0

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 Введена.

Где вызывается хук

Checkout::create_customer_account()
woocommerce_created_customer
wc_create_new_customer()
woocommerce_created_customer
woocommerce/src/StoreApi/Routes/V1/Checkout.php 707
do_action( 'woocommerce_created_customer', $customer_id, $new_customer_data, $password_generated );
woocommerce/includes/wc-user-functions.php 115
do_action( 'woocommerce_created_customer', $customer_id, $new_customer_data, $password_generated );

Где используется хук в WooCommerce

Использование не найдено.