woocommerce / woocommerce-gateway-paypal-express-checkout

58 stars 65 forks source link

Add email opt in to paypal express checkout from product page #880

Closed DiscountSales closed 2 years ago

DiscountSales commented 2 years ago

I would like to add an email opt in box to the checkout page when someone checkouts via PayPal from the product page like how it does from the checkout page. I am using Klaviyo for email marketing. Does anyone know how to do this?

Here is a screenshot of that function on standard checkout: https://imgur.com/GOH4iVd

Here is a screenshot of express checkout page: https://imgur.com/6QND5Dj

Environment:

chickenn00dle commented 2 years ago

Hey @DiscountSales 👋

This is a bit tricky as we are replacing the billing and shipping fields entirely when returning from PayPal after checkout from a product page. This is because, at this stage, PayPal expects these fields to line up with what they've collected.

As a result, it's not so simple to get extensions that target these fields to work with this particular checkout flow.

If it is critical that this opt-in box be present at checkout, I would recommend disabling checkout from product pages. I know this isn't the answer you were looking for, but unfortunately, there isn't much we can do outside of a major rework of checkout from product.