Pull request: Prefill email for non-loggedin customers
-
Hello, and thanks for a cool plugin! Currently the customer email is prefilled in Stripe Checkout only when the customer is logged in my Woocommerce store.
Current situation in yith-woocommerce-stripe/includes/class-yith-stripe-gateway.php (line #514):
$customer_email = wp_get_current_user()->billing_email;
Improved code for yith-woocommerce-stripe/includes/class-yith-stripe-gateway.php (line #514):
$customer_email = isset(wp_get_current_user()->billing_email ? wp_get_current_user()->billing_email : WC()->session->data['billing_email']);
I would be really happy if you can make this change! It would mean better conversion for customers who are not logged in, because they don’t need to type their email address twice.
- The topic ‘Pull request: Prefill email for non-loggedin customers’ is closed to new replies.