woocommerce_checkout_customer_id, get_current_user_id(
woocommerce_checkout_customer_id, get_current_user_id(
Appears in: woocommerce.11.0.0
Hook Type: filter
Displaying hooks found in version: woocommerce.11.0.0apply_filters('woocommerce_checkout_customer_id, get_current_user_id(') is found 3 times:
- /includes/class-wc-checkout.php line 185
* @since 3.0.0 or earlier * * @param int The current user's ID (this may be 0 if no user is logged in). */ return apply_filters( 'woocommerce_checkout_customer_id', get_current_user_id() ); case 'shipping_methods': return (array) WC()->session->get( 'chosen_shipping_methods' ); } } /**
- /includes/class-wc-checkout.php line 458
* This action is documented in woocommerce/includes/class-wc-checkout.php * * @since 3.0.0 or earlier */ $order->set_customer_id( apply_filters( 'woocommerce_checkout_customer_id', get_current_user_id() ) ); $order->set_currency( get_woocommerce_currency() ); $order->set_prices_include_tax( 'yes' === get_option( 'woocommerce_prices_include_tax' ) ); $order->set_customer_ip_address( WC_Geolocation::get_ip_address() ); $order->set_customer_user_agent( wc_get_user_agent() ); $order->set_customer_note( isset( $data['order_comments'] ) ? $data['order_comments'] : '' ); $order->set_payment_method( isset( $available_gateways[ $data['payment_method'] ] ) ? $available_gateways[ $data['payment_method'] ] : $data['payment_method'] );
- /includes/class-wc-checkout.php line 1233
* This action is documented in woocommerce/includes/class-wc-checkout.php * * @since 3.0.0 or earlier */ $customer_id = apply_filters( 'woocommerce_checkout_customer_id', get_current_user_id() ); if ( ! is_user_logged_in() && ( $this->is_registration_required() || ! empty( $data['createaccount'] ) ) ) { $username = ! empty( $data['account_username'] ) ? $data['account_username'] : ''; $password = ! empty( $data['account_password'] ) ? $data['account_password'] : ''; $customer_id = wc_create_new_customer( $data['billing_email'],