woocommerce_new_customer хук-событиеWC 1.0

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

add_action( 'woocommerce_new_customer', 'wp_kama_woocommerce_new_customer_action', 10, 2 );

/**
 * Function for `woocommerce_new_customer` action-hook.
 * 
 * @param  $customer_id 
 * @param  $customer    
 *
 * @return void
 */
function wp_kama_woocommerce_new_customer_action( $customer_id, $customer ){

	// action...
}
$customer_id
-
$customer
-

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

WC_Customer_Data_Store::create()
woocommerce_new_customer
woocommerce/includes/data-stores/class-wc-customer-data-store.php 140
do_action( 'woocommerce_new_customer', $customer->get_id(), $customer );

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

woocommerce/src/Internal/Admin/Schedulers/CustomersScheduler.php 30
add_action( 'woocommerce_new_customer', array( __CLASS__, 'schedule_import' ) );