Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Theme] Fix cart requests #4497

Merged
merged 4 commits into from
Sep 20, 2024
Merged

[Theme] Fix cart requests #4497

merged 4 commits into from
Sep 20, 2024

Conversation

frandiox
Copy link
Contributor

WHY are these changes introduced?

Closes #4488

WHAT is this pull request doing?

The h3 utility we were using for headers was removing accept header. The cart requests need accept: application/javascript (cart/add) and application/json (cart/change) to work in SFR. Since this header was removed, it was responding with either 302 or 401.

How to test your changes?

Add an item to cart with and without the changes in this PR.

cc @Shopify/advanced-edits

Copy link
Contributor

Thanks for your contribution!

Depending on what you are working on, you may want to request a review from a Shopify team:

  • Themes: @shopify/advanced-edits
  • UI extensions: @shopify/ui-extensions-cli
    • Checkout UI extensions: @shopify/checkout-ui-extensions-api-stewardship
  • Hydrogen: @shopify/hydrogen
  • Other: @shopify/app-inner-loop

Copy link
Contributor

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
73.04% (+0.01% 🔼)
8392/11490
🟡 Branches
69.56% (+0.02% 🔼)
4093/5884
🟡 Functions 71.81% 2181/3037
🟡 Lines
73.39% (+0.01% 🔼)
7941/10821

Test suite run success

1890 tests passing in 858 suites.

Report generated by 🧪jest coverage report action from fa91638

Copy link
Contributor

@charlespwd charlespwd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@frandiox frandiox added this pull request to the merge queue Sep 20, 2024
Merged via the queue into main with commit c24bfca Sep 20, 2024
36 checks passed
@frandiox frandiox deleted the fd-fix-cart-post branch September 20, 2024 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants