Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Use authenticated user's email as default email
Unknown522fb0da94c5
diff --git a/saleor/graphql/checkout/mutations.py b/saleor/graphql/checkout/mutations.pyindex b9bd58ad2e..730a6caa31 100644--- a/saleor/graphql/checkout/mutations.py+++ b/saleor/graphql/checkout/mutations.py@@ -151,6 +151,11 @@ class CheckoutCreate(ModelMutation, I18nMixin):else:cleaned_input['billing_address'] = default_billing_address+ # Use authenticated user's email as default email+ if not user.is_anonymous:+ email = input.pop('email', None)+ cleaned_input['email'] = email or user.email+return cleaned_input@classmethod