Skip to content

Commit 65b9401

Browse files
AC-6695: Guest Checkout Fix
1 parent d0d67d4 commit 65b9401

File tree

3 files changed

+41
-40
lines changed

3 files changed

+41
-40
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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,9 @@ public function resendConfirmation($email, $websiteId, $redirectUrl = '');
197197
* @param string $customerEmail
198198
* @param int|null $websiteId If not set, will use the current websiteId
199199
* @return bool
200-
* @throws LocalizedException
200+
* @throws \Magento\Framework\Exception\LocalizedException
201201
*/
202-
public function isEmailAvailable(string $customerEmail, int $websiteId = null): bool;
202+
public function isEmailAvailable($customerEmail, $websiteId = null);
203203

204204
/**
205205
* Check store availability for customer given the customerId.

app/code/Magento/Customer/Model/AccountManagement.php

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -223,177 +223,177 @@ class AccountManagement implements AccountManagementInterface
223223
/**
224224
* @var CustomerFactory
225225
*/
226-
private CustomerFactory $customerFactory;
226+
private $customerFactory;
227227

228228
/**
229229
* @var ValidationResultsInterfaceFactory
230230
*/
231-
private ValidationResultsInterfaceFactory $validationResultsDataFactory;
231+
private $validationResultsDataFactory;
232232

233233
/**
234234
* @var ManagerInterface
235235
*/
236-
private ManagerInterface $eventManager;
236+
private $eventManager;
237237

238238
/**
239239
* @var StoreManagerInterface
240240
*/
241-
private StoreManagerInterface $storeManager;
241+
private $storeManager;
242242

243243
/**
244244
* @var Random
245245
*/
246-
private Random $mathRandom;
246+
private $mathRandom;
247247

248248
/**
249249
* @var Validator
250250
*/
251-
private Validator $validator;
251+
private $validator;
252252

253253
/**
254254
* @var AddressRepositoryInterface
255255
*/
256-
private AddressRepositoryInterface $addressRepository;
256+
private $addressRepository;
257257

258258
/**
259259
* @var CustomerMetadataInterface
260260
*/
261-
private CustomerMetadataInterface $customerMetadataService;
261+
private $customerMetadataService;
262262

263263
/**
264264
* @var PsrLogger
265265
*/
266-
protected PsrLogger $logger;
266+
protected $logger;
267267

268268
/**
269269
* @var Encryptor
270270
*/
271-
private Encryptor $encryptor;
271+
private $encryptor;
272272

273273
/**
274274
* @var CustomerRegistry
275275
*/
276-
private CustomerRegistry $customerRegistry;
276+
private $customerRegistry;
277277

278278
/**
279279
* @var ConfigShare
280280
*/
281-
private ConfigShare $configShare;
281+
private $configShare;
282282

283283
/**
284284
* @var StringHelper
285285
*/
286-
protected StringHelper $stringHelper;
286+
protected $stringHelper;
287287

288288
/**
289289
* @var CustomerRepositoryInterface
290290
*/
291-
private CustomerRepositoryInterface $customerRepository;
291+
private $customerRepository;
292292

293293
/**
294294
* @var ScopeConfigInterface
295295
*/
296-
private ScopeConfigInterface $scopeConfig;
296+
private $scopeConfig;
297297

298298
/**
299299
* @var TransportBuilder
300300
*/
301-
private TransportBuilder $transportBuilder;
301+
private $transportBuilder;
302302

303303
/**
304304
* @var DataObjectProcessor
305305
*/
306-
protected DataObjectProcessor $dataProcessor;
306+
protected $dataProcessor;
307307

308308
/**
309309
* @var Registry
310310
*/
311-
protected Registry $registry;
311+
protected $registry;
312312

313313
/**
314314
* @var CustomerViewHelper
315315
*/
316-
protected CustomerViewHelper $customerViewHelper;
316+
protected $customerViewHelper;
317317

318318
/**
319319
* @var DateTime
320320
*/
321-
protected DateTime $dateTime;
321+
protected $dateTime;
322322

323323
/**
324324
* @var ObjectFactory
325325
*/
326-
protected ObjectFactory $objectFactory;
326+
protected $objectFactory;
327327

328328
/**
329329
* @var ExtensibleDataObjectConverter
330330
*/
331-
protected ExtensibleDataObjectConverter $extensibleDataObjectConverter;
331+
protected $extensibleDataObjectConverter;
332332

333333
/**
334334
* @var CustomerModel
335335
*/
336-
protected CustomerModel $customerModel;
336+
protected $customerModel;
337337

338338
/**
339339
* @var AuthenticationInterface
340340
*/
341-
protected AuthenticationInterface $authentication;
341+
protected $authentication;
342342

343343
/**
344344
* @var EmailNotificationInterface
345345
*/
346-
private EmailNotificationInterface $emailNotification;
346+
private $emailNotification;
347347

348348
/**
349349
* @var Backend
350350
*/
351-
private Backend $eavValidator;
351+
private $eavValidator;
352352

353353
/**
354354
* @var CredentialsValidator
355355
*/
356-
private CredentialsValidator $credentialsValidator;
356+
private $credentialsValidator;
357357

358358
/**
359359
* @var DateTimeFactory
360360
*/
361-
private DateTimeFactory $dateTimeFactory;
361+
private $dateTimeFactory;
362362

363363
/**
364364
* @var AccountConfirmation
365365
*/
366-
private AccountConfirmation $accountConfirmation;
366+
private $accountConfirmation;
367367

368368
/**
369369
* @var SearchCriteriaBuilder
370370
*/
371-
private SearchCriteriaBuilder $searchCriteriaBuilder;
371+
private $searchCriteriaBuilder;
372372

373373
/**
374374
* @var AddressRegistry
375375
*/
376-
private AddressRegistry $addressRegistry;
376+
private $addressRegistry;
377377

378378
/**
379379
* @var AllowedCountries
380380
*/
381-
private AllowedCountries $allowedCountriesReader;
381+
private $allowedCountriesReader;
382382

383383
/**
384384
* @var GetCustomerByToken
385385
*/
386-
private GetCustomerByToken $getByToken;
386+
private $getByToken;
387387

388388
/**
389389
* @var SessionCleanerInterface
390390
*/
391-
private SessionCleanerInterface $sessionCleaner;
391+
private $sessionCleaner;
392392

393393
/**
394394
* @var AuthorizationInterface
395395
*/
396-
private AuthorizationInterface $authorization;
396+
private $authorization;
397397

398398
/**
399399
* @var CustomerLogger
@@ -1146,16 +1146,17 @@ public function validate(CustomerInterface $customer)
11461146
* @param string $customerEmail
11471147
* @param int|null $websiteId
11481148
* @return bool
1149+
* @throws LocalizedException
11491150
*/
1150-
public function isEmailAvailable(string $customerEmail, int $websiteId = null): bool
1151+
public function isEmailAvailable($customerEmail, $websiteId = null)
11511152
{
11521153
$guestLoginConfig = $this->scopeConfig->getValue(
11531154
self::GUEST_CHECKOUT_LOGIN_OPTION_SYS_CONFIG,
11541155
ScopeInterface::SCOPE_WEBSITE,
11551156
$websiteId
11561157
);
11571158

1158-
if ($guestLoginConfig === null || $guestLoginConfig === false) {
1159+
if (!$guestLoginConfig) {
11591160
return true;
11601161
}
11611162

0 commit comments

Comments
 (0)