Skip to content

Commit c3f32ac

Browse files
committed
MC-40262: Issue with setShippingMethodsOnCart GraphQL Method - PWA
- Fix logged in customer should be able to checkout if "Allow Guest Checkout" is disabled
1 parent 427f9bf commit c3f32ac

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

app/code/Magento/QuoteGraphQl/Model/Cart/CheckCartCheckoutAllowance.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function __construct(
3939
*/
4040
public function execute(Quote $quote): void
4141
{
42-
if (false === $quote->getCustomerIsGuest()) {
42+
if (!$quote->getCustomerIsGuest()) {
4343
return;
4444
}
4545

dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1759,4 +1759,16 @@ private function getPlaceOrderQuery(string $maskedQuoteId): string
17591759
}
17601760
QUERY;
17611761
}
1762+
1763+
/**
1764+
* @magentoApiDataFixture Magento/Customer/_files/customer.php
1765+
* @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php
1766+
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php
1767+
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php
1768+
* @magentoConfigFixture default_store checkout/options/guest_checkout 0
1769+
*/
1770+
public function testSetBillingAddressAndPlaceOrderWithGuestCheckoutDisabled()
1771+
{
1772+
$this->testSetBillingAddressAndPlaceOrder();
1773+
}
17621774
}

dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetShippingAddressOnCartTest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1950,4 +1950,17 @@ private function getPlaceOrderQuery(string $maskedQuoteId): string
19501950
}
19511951
QUERY;
19521952
}
1953+
1954+
/**
1955+
* @magentoApiDataFixture Magento/Customer/_files/customer.php
1956+
* @magentoApiDataFixture Magento/GraphQl/Catalog/_files/simple_product.php
1957+
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/customer/create_empty_cart.php
1958+
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/add_simple_product.php
1959+
* @magentoApiDataFixture Magento/GraphQl/Quote/_files/set_new_billing_address.php
1960+
* @magentoConfigFixture default_store checkout/options/guest_checkout 0
1961+
*/
1962+
public function testSetNewShippingAddressAndPlaceOrderWithGuestCheckoutDisabled()
1963+
{
1964+
$this->testSetNewShippingAddressAndPlaceOrder();
1965+
}
19531966
}

0 commit comments

Comments
 (0)