woocommerce_checkout_update_customer_data

woocommerce_checkout_update_customer_data

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.8.1

apply_filters('woocommerce_checkout_update_customer_data') is found 1 times:

  • /includes/class-wc-checkout.php line 1185
    1181
    1182
    1183
    1184
    1185
    1186
    1187
    1188
    1189
    1190
        add_user_to_blog( get_current_blog_id(), $customer_id, 'customer' );
    }
     
    // Add customer info from other fields.
    if ( $customer_id && apply_filters( 'woocommerce_checkout_update_customer_data', true, $this ) ) {
        $customer = new WC_Customer( $customer_id );
     
        if ( ! empty( $data['billing_first_name'] ) && '' === $customer->get_first_name() ) {
            $customer->set_first_name( $data['billing_first_name'] );
        }