The MDVA-39521 patch solves the issue where the user is unable to set shipping address on carts with an empty phone number via GraphQL. This patch is available when the Quality Patches Tool (QPT) 1.1.2 is installed. The patch ID is MDVA-39521. Please note that the issue is scheduled to be fixed in Adobe Commerce 2.4.4.
The patch is created for Adobe Commerce version:
Compatible with Adobe Commerce versions:
The patch might become applicable to other versions with new Quality Patches Tool releases. To check if the patch is compatible with your Adobe Commerce version, update the magento/quality-patches
package to the latest version and check the compatibility on the Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.
The user is not able to set shipping address on the carts with an empty telephone number via GraphQL despite the fact that the Show Telephone is configured as optional.
Steps to reproduce:
Create a simple product.
Go to Stores > Configuration > Customers > Customer Configuration > Name and Address Options and set the Show Telephone as Optional.
Create an empty cart via GraphQL request.
mutation {
createEmptyCart
}
Add product to cart.
mutation {
addSimpleProductsToCart(
input: {
cart_id: "{ CART_ID }"
cart_items: [
{
data: {
quantity: 1
sku: "24-MG04"
}
}
]
}
) {
cart {
items {
id
product {
sku
stock_status
}
quantity
}
}
}
}
Add address: GRAPHQL VARIABLES.
{
"cartId": "6Efw00UbjPoP5cvTFhsswDTjpxs0Xupt"
}
mutation ($cartId: String!) {
setShippingAddressesOnCart(input: {cart_id: $cartId, shipping_addresses:
{address: {firstname: "John", lastname: "Doe", company: "Company Name",
street: ["820 Burrard Street"], city: "Vancouver", region: "BC", postcode: "V6Z 2J1",
country_code: "CA", telephone: "123-456-0000", save_in_address_book: false}}}) {
cart {
shipping_addresses {
firstname
lastname
company
street
city
postcode
telephone
country {
code
label
}
}
}
}
}
Result:
{
"data": {
"setShippingAddressesOnCart": {
"cart": {
"shipping_addresses": [
{
"firstname": "John",
"lastname": "Canada",
"company": "Company Name",
"street": [
"820 Burrard Street"
],
"city": "Vancouver",
"postcode": "V6Z 2J1",
"telephone": "123-456-0000",
"country": {
"code": "CA",
"label": "CA"
}
}
]
}
}
}
}
Add address with empty phone number.
mutation ($cartId: String!) {
setShippingAddressesOnCart(input: {cart_id: $cartId, shipping_addresses: {address: {firstname:
"John", lastname: "Canada", company: "Company Name", street: ["820 Burrard Street"], city:
"Vancouver", region: "BC", postcode: "V6Z 2J1", country_code: "CA", telephone: "123-456-0000",
save_in_address_book: false}}}) {
cart {
shipping_addresses {
firstname
lastname
company
street
city
postcode
telephone
country {
code
label
}
}
}
}
}
Expected results:
{
"data": {
"setShippingAddressesOnCart": {
"cart": {
"shipping_addresses": [
{
"firstname": "John",
"lastname": "Doe",
"company": "Company Name",
"street": [
"820 Burrard Street"
],
"city": "Vancouver",
"postcode": "V6Z 2J1",
"telephone": "",
"country": {
"code": "CA",
"label": "CA"
}
}
]
}
}
}
}
Actual results:
{
"data": {
"setShippingAddressesOnCart": {
"cart": {
"shipping_addresses": []
}
}
}
}
To apply individual patches, use the following links depending on your deployment type:
To learn more about Quality Patches Tool, refer to:
For info about other patches available in QPT, refer to the Patches available in QPT section.