woocommerce_checkout_customer_id filter-hookWC 1.0

Create a new customer account if needed.

Usage

add_filter( 'woocommerce_checkout_customer_id', 'wp_kama_woocommerce_checkout_customer_id_filter' );

/**
 * Function for `woocommerce_checkout_customer_id` filter-hook.
 * 
 * @param array $data Posted data.
 *
 * @return array
 */
function wp_kama_woocommerce_checkout_customer_id_filter( $data ){

	// filter...
	return $data;
}
$data(array)
Posted data.

Where the hook is called

WC_Checkout::process_customer()
woocommerce_checkout_customer_id
WC_Checkout::__get()
woocommerce_checkout_customer_id
WC_Checkout::create_order()
woocommerce_checkout_customer_id
woocommerce/includes/class-wc-checkout.php 1033
$customer_id = apply_filters( 'woocommerce_checkout_customer_id', get_current_user_id() );
woocommerce/includes/class-wc-checkout.php 157
return apply_filters( 'woocommerce_checkout_customer_id', get_current_user_id() );
woocommerce/includes/class-wc-checkout.php 374
$order->set_customer_id( apply_filters( 'woocommerce_checkout_customer_id', get_current_user_id() ) );

Where the hook is used in WooCommerce

Usage not found.