diff --git a/includes/Api/CheckoutController.php b/includes/Api/CheckoutController.php index 8459001..9c1407c 100644 --- a/includes/Api/CheckoutController.php +++ b/includes/Api/CheckoutController.php @@ -313,6 +313,10 @@ class CheckoutController { // Send new account email (WooCommerce will handle this automatically via hook) do_action('woocommerce_created_customer', $new_user_id, $userdata, $password); + + // Auto-login the newly registered user for smoother UX + wp_set_current_user($new_user_id); + wp_set_auth_cookie($new_user_id, true); // true = remember me } } }