Skip to content

GraphQL setBillingAddressOnCart does not return updated cart #38231

Open
@dennisvanderweide

Description

@dennisvanderweide

Preconditions and environment

  • Magento 2.4.6-p3

Steps to reproduce

Update billing address on a cart using the GraphQL setBillingAddressOnCart mutation

Expected result

I would expect the mutation to return the updated cart just like with setShippingAddressOnCart``

Actual result

It returns the cart as it was before the mutation

Additional information

The setShippingAddressOnCart mutation executes the following code at the end of the execute function

// reload updated cart & trigger quote re-evaluation after address change
$maskedId = $this->quoteIdToMaskedQuoteId->execute((int)$cart->getId());
$cart = $this->getCartForUser->execute($maskedId, $context->getUserId(), $cart->getStoreId());
$this->quoteRepository->save($cart);

This updates the cart so the updated cart is returned. setBillingAddressOnCart doesn't do this. Simply adding this at the end of the execute function of setBillingAddressOnCart would solve this issue.

Release note

No response

Triage and priority

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions