Skip to content

Commit fd9ee59

Browse files
AC-6695: Guest Checkout Fix
1 parent 275783d commit fd9ee59

File tree

3 files changed

+177
-285
lines changed

3 files changed

+177
-285
lines changed

app/code/Magento/Checkout/etc/adminhtml/system.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
</field>
2828
<field id="display_billing_address_on" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
2929
<label>Display Billing Address On</label>
30-
<source_model>\Magento\Checkout\Model\Adminhtml\BillingAddressDisplayOptions</source_model>
30+
<source_model>Magento\Checkout\Model\Adminhtml\BillingAddressDisplayOptions</source_model>
3131
</field>
3232
<field id="max_items_display_count" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
3333
<label>Maximum Number of Items to Display in Order Summary</label>

app/code/Magento/Customer/Api/AccountManagementInterface.php

Lines changed: 64 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,7 @@
77

88
namespace Magento\Customer\Api;
99

10-
use Magento\Customer\Api\Data\AddressInterface;
11-
use Magento\Customer\Api\Data\CustomerInterface;
12-
use Magento\Customer\Api\Data\ValidationResultsInterface;
1310
use Magento\Framework\Exception\InputException;
14-
use Magento\Framework\Exception\LocalizedException;
15-
use Magento\Framework\Exception\NoSuchEntityException;
16-
use Magento\Framework\Exception\State\ExpiredException;
17-
use Magento\Framework\Exception\State\InputMismatchException;
1811

1912
/**
2013
* Interface for managing customers accounts.
@@ -35,84 +28,84 @@ interface AccountManagementInterface
3528
/**
3629
* Create customer account. Perform necessary business operations like sending email.
3730
*
38-
* @param CustomerInterface $customer
39-
* @param string|null $password
31+
* @param \Magento\Customer\Api\Data\CustomerInterface $customer
32+
* @param string $password
4033
* @param string $redirectUrl
41-
* @return CustomerInterface
42-
* @throws LocalizedException
34+
* @return \Magento\Customer\Api\Data\CustomerInterface
35+
* @throws \Magento\Framework\Exception\LocalizedException
4336
*/
4437
public function createAccount(
4538
\Magento\Customer\Api\Data\CustomerInterface $customer,
46-
$password = null,
47-
$redirectUrl = ''
39+
$password = null,
40+
$redirectUrl = ''
4841
);
4942

5043
/**
5144
* Create customer account using provided hashed password. Should not be exposed as a webapi.
5245
*
53-
* @param CustomerInterface $customer
46+
* @param \Magento\Customer\Api\Data\CustomerInterface $customer
5447
* @param string $hash Password hash that we can save directly
5548
* @param string $redirectUrl URL fed to welcome email templates. Can be used by templates to, for example, direct
5649
* the customer to a product they were looking at after pressing confirmation link.
57-
* @return CustomerInterface
58-
* @throws InputException If bad input is provided
59-
* @throws InputMismatchException If the provided email is already used
60-
* @throws LocalizedException
50+
* @return \Magento\Customer\Api\Data\CustomerInterface
51+
* @throws \Magento\Framework\Exception\InputException If bad input is provided
52+
* @throws \Magento\Framework\Exception\State\InputMismatchException If the provided email is already used
53+
* @throws \Magento\Framework\Exception\LocalizedException
6154
*/
6255
public function createAccountWithPasswordHash(
63-
CustomerInterface $customer,
64-
string $hash,
65-
string $redirectUrl = ''
66-
): CustomerInterface;
56+
\Magento\Customer\Api\Data\CustomerInterface $customer,
57+
$hash,
58+
$redirectUrl = ''
59+
);
6760

6861
/**
6962
* Validate customer data.
7063
*
71-
* @param CustomerInterface $customer
72-
* @return ValidationResultsInterface
73-
* @throws LocalizedException
64+
* @param \Magento\Customer\Api\Data\CustomerInterface $customer
65+
* @return \Magento\Customer\Api\Data\ValidationResultsInterface
66+
* @throws \Magento\Framework\Exception\LocalizedException
7467
*/
75-
public function validate(CustomerInterface $customer): ValidationResultsInterface;
68+
public function validate(\Magento\Customer\Api\Data\CustomerInterface $customer);
7669

7770
/**
7871
* Check if customer can be deleted.
7972
*
8073
* @param int $customerId
8174
* @return bool
82-
* @throws NoSuchEntityException If group is not found
83-
* @throws LocalizedException
75+
* @throws \Magento\Framework\Exception\NoSuchEntityException If group is not found
76+
* @throws \Magento\Framework\Exception\LocalizedException
8477
*/
85-
public function isReadonly(int $customerId): bool;
78+
public function isReadonly($customerId);
8679

8780
/**
8881
* Activate a customer account using a key that was sent in a confirmation email.
8982
*
9083
* @param string $email
9184
* @param string $confirmationKey
92-
* @return CustomerInterface
93-
* @throws LocalizedException
85+
* @return \Magento\Customer\Api\Data\CustomerInterface
86+
* @throws \Magento\Framework\Exception\LocalizedException
9487
*/
95-
public function activate(string $email, string $confirmationKey): CustomerInterface;
88+
public function activate($email, $confirmationKey);
9689

9790
/**
9891
* Activate a customer account using a key that was sent in a confirmation email.
9992
*
10093
* @param int $customerId
10194
* @param string $confirmationKey
102-
* @return CustomerInterface
103-
* @throws LocalizedException
95+
* @return \Magento\Customer\Api\Data\CustomerInterface
96+
* @throws \Magento\Framework\Exception\LocalizedException
10497
*/
105-
public function activateById(int $customerId, string $confirmationKey): CustomerInterface;
98+
public function activateById($customerId, $confirmationKey);
10699

107100
/**
108101
* Authenticate a customer by username and password
109102
*
110103
* @param string $email
111104
* @param string $password
112-
* @return CustomerInterface
113-
* @throws LocalizedException
105+
* @return \Magento\Customer\Api\Data\CustomerInterface
106+
* @throws \Magento\Framework\Exception\LocalizedException
114107
*/
115-
public function authenticate(string $email, string $password): CustomerInterface;
108+
public function authenticate($email, $password);
116109

117110
/**
118111
* Change customer password.
@@ -121,9 +114,9 @@ public function authenticate(string $email, string $password): CustomerInterface
121114
* @param string $currentPassword
122115
* @param string $newPassword
123116
* @return bool true on success
124-
* @throws LocalizedException
117+
* @throws \Magento\Framework\Exception\LocalizedException
125118
*/
126-
public function changePassword(string $email, string $currentPassword, string $newPassword): bool;
119+
public function changePassword($email, $currentPassword, $newPassword);
127120

128121
/**
129122
* Change customer password.
@@ -132,20 +125,20 @@ public function changePassword(string $email, string $currentPassword, string $n
132125
* @param string $currentPassword
133126
* @param string $newPassword
134127
* @return bool true on success
135-
* @throws LocalizedException
128+
* @throws \Magento\Framework\Exception\LocalizedException
136129
*/
137-
public function changePasswordById(int $customerId, string $currentPassword, string $newPassword): bool;
130+
public function changePasswordById($customerId, $currentPassword, $newPassword);
138131

139132
/**
140133
* Send an email to the customer with a password reset link.
141134
*
142135
* @param string $email
143136
* @param string $template
144-
* @param int|null $websiteId
137+
* @param int $websiteId
145138
* @return bool true on success
146-
* @throws LocalizedException
139+
* @throws \Magento\Framework\Exception\LocalizedException
147140
*/
148-
public function initiatePasswordReset(string $email, string $template, int $websiteId = null): bool;
141+
public function initiatePasswordReset($email, $template, $websiteId = null);
149142

150143
/**
151144
* Reset customer password.
@@ -156,10 +149,10 @@ public function initiatePasswordReset(string $email, string $template, int $webs
156149
* @param string $newPassword
157150
*
158151
* @return bool true on success
159-
* @throws LocalizedException
152+
* @throws \Magento\Framework\Exception\LocalizedException
160153
* @throws InputException
161154
*/
162-
public function resetPassword(string $email, string $resetToken, string $newPassword): bool;
155+
public function resetPassword($email, $resetToken, $newPassword);
163156

164157
/**
165158
* Check if password reset token is valid.
@@ -169,22 +162,22 @@ public function resetPassword(string $email, string $resetToken, string $newPass
169162
* @param string $resetPasswordLinkToken
170163
*
171164
* @return bool True if the token is valid
172-
* @throws InputMismatchException If token is mismatched
173-
* @throws ExpiredException If token is expired
174-
* @throws InputException If token or customer id is invalid
175-
* @throws NoSuchEntityException If customer doesn't exist
176-
* @throws LocalizedException
165+
* @throws \Magento\Framework\Exception\State\InputMismatchException If token is mismatched
166+
* @throws \Magento\Framework\Exception\State\ExpiredException If token is expired
167+
* @throws \Magento\Framework\Exception\InputException If token or customer id is invalid
168+
* @throws \Magento\Framework\Exception\NoSuchEntityException If customer doesn't exist
169+
* @throws \Magento\Framework\Exception\LocalizedException
177170
*/
178-
public function validateResetPasswordLinkToken(int $customerId, string $resetPasswordLinkToken): bool;
171+
public function validateResetPasswordLinkToken($customerId, $resetPasswordLinkToken);
179172

180173
/**
181174
* Gets the account confirmation status.
182175
*
183176
* @param int $customerId
184177
* @return string
185-
* @throws LocalizedException
178+
* @throws \Magento\Framework\Exception\LocalizedException
186179
*/
187-
public function getConfirmationStatus(int $customerId): string;
180+
public function getConfirmationStatus($customerId);
188181

189182
/**
190183
* Resend confirmation email.
@@ -193,55 +186,55 @@ public function getConfirmationStatus(int $customerId): string;
193186
* @param int $websiteId
194187
* @param string $redirectUrl
195188
* @return bool true on success
196-
* @throws LocalizedException
189+
* @throws \Magento\Framework\Exception\LocalizedException
197190
*/
198-
public function resendConfirmation(string $email, int $websiteId, string $redirectUrl = ''): bool;
191+
public function resendConfirmation($email, $websiteId, $redirectUrl = '');
199192

200193
/**
201194
* Check if given email is associated with a customer account in given website.
202195
*
203196
* @param string $customerEmail
204-
* @param int|null $websiteId If not set, will use the current websiteId
197+
* @param int $websiteId If not set, will use the current websiteId
205198
* @return bool
206-
* @throws LocalizedException
199+
* @throws \Magento\Framework\Exception\LocalizedException
207200
*/
208-
public function isEmailAvailable(string $customerEmail, int $websiteId = null): bool;
201+
public function isEmailAvailable($customerEmail, $websiteId = null);
209202

210203
/**
211204
* Check store availability for customer given the customerId.
212205
*
213206
* @param int $customerWebsiteId
214207
* @param int $storeId
215208
* @return bool
216-
* @throws LocalizedException
209+
* @throws \Magento\Framework\Exception\LocalizedException
217210
*/
218-
public function isCustomerInStore(int $customerWebsiteId, int $storeId): bool;
211+
public function isCustomerInStore($customerWebsiteId, $storeId);
219212

220213
/**
221214
* Retrieve default billing address for the given customerId.
222215
*
223216
* @param int $customerId
224-
* @return AddressInterface
225-
* @throws NoSuchEntityException If the customer Id is invalid
226-
* @throws LocalizedException
217+
* @return \Magento\Customer\Api\Data\AddressInterface
218+
* @throws \Magento\Framework\Exception\NoSuchEntityException If the customer Id is invalid
219+
* @throws \Magento\Framework\Exception\LocalizedException
227220
*/
228-
public function getDefaultBillingAddress(int $customerId): Data\AddressInterface;
221+
public function getDefaultBillingAddress($customerId);
229222

230223
/**
231224
* Retrieve default shipping address for the given customerId.
232225
*
233226
* @param int $customerId
234-
* @return AddressInterface
235-
* @throws NoSuchEntityException If the customer Id is invalid
236-
* @throws LocalizedException
227+
* @return \Magento\Customer\Api\Data\AddressInterface
228+
* @throws \Magento\Framework\Exception\NoSuchEntityException If the customer Id is invalid
229+
* @throws \Magento\Framework\Exception\LocalizedException
237230
*/
238-
public function getDefaultShippingAddress(int $customerId): AddressInterface;
231+
public function getDefaultShippingAddress($customerId);
239232

240233
/**
241234
* Return hashed password, which can be directly saved to database.
242235
*
243236
* @param string $password
244237
* @return string
245238
*/
246-
public function getPasswordHash(string $password): string;
239+
public function getPasswordHash($password);
247240
}

0 commit comments

Comments
 (0)