Open theskyfloor opened 3 years ago
Hi @theskyfloor I see the issue here, this workflow was thinking also on guest users that's why we use the email. If you go to Stripe Payments -> Settings -> Defaults and enable Email address of the logged-in user
it will populate the email of the user on the checkout however the user can still update their email on the checkout page. I'll add some logic to get the user from their Id if the user was logged in.
@andrelopez Can you please push this update ASAP? It is important because if you change the email address on the Stripe checkout page doesn't match the users email address, then the order subscription fails.
Description
I had a user subscribe but in the process they changed their email address via checkout, this made it so that the grant did not process, would it be possible to change
line 229
ofsrc/services/Subscriptions.php
from:$user = Craft::$app->getUsers()->getUserByUsernameOrEmail($order->email);
to
$user = Craft::$app->users->getUserById($order->userId);
So that in the off chance this happens the membership grant processes... plus if a user changes their email in Craft it then gets out sync with Stripe, this edit should prevent that right?
Steps to reproduce