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

Shopify cookie fix again #2143

Merged
merged 1 commit into from
May 22, 2024
Merged

Shopify cookie fix again #2143

merged 1 commit into from
May 22, 2024

Conversation

wizardlyhel
Copy link
Contributor

WHY are these changes introduced?

The cookie domain isn't being picked up by default

WHAT is this pull request doing?

Make sure we always have a domain host to work with useShopifyCookie

HOW to test your changes?

Post-merge steps

Checklist

  • I've read the Contributing Guidelines
  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've added a changeset if this PR contains user-facing or noteworthy changes
  • I've added tests to cover my changes
  • I've added or updated the documentation

Copy link
Contributor

We detected some changes in packages/*/package.json or packages/*/src, and there are no updates in the .changeset.
If the changes are user-facing and should cause a version bump, run npm run changeset add to track your changes and include them in the next release CHANGELOG.
If you are making simple updates to examples or documentation, you do not need to add a changeset.

Copy link
Contributor

shopify bot commented May 22, 2024

Oxygen deployed a preview of your hl-fix-cookie-domain-2 branch. Details:

Storefront Status Preview link Deployment details Last update (UTC)
optimistic-cart-ui ✅ Successful (Logs) Preview deployment Inspect deployment May 22, 2024 7:41 PM
Skeleton (skeleton.hydrogen.shop) ✅ Successful (Logs) Preview deployment Inspect deployment May 22, 2024 7:41 PM
vite ✅ Successful (Logs) Preview deployment Inspect deployment May 22, 2024 7:41 PM
custom-cart-method ✅ Successful (Logs) Preview deployment Inspect deployment May 22, 2024 7:41 PM
subscriptions ✅ Successful (Logs) Preview deployment Inspect deployment May 22, 2024 7:41 PM
third-party-queries-caching ✅ Successful (Logs) Preview deployment Inspect deployment May 22, 2024 7:41 PM

Learn more about Hydrogen's GitHub integration.

*/

// Use override domain or current host
let currentDomain = domain || window.document.location.host;
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this fail during SSR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's inside a useEffect

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, thx, didn't notice.

@wizardlyhel wizardlyhel merged commit 9bce950 into main May 22, 2024
13 checks passed
@wizardlyhel wizardlyhel deleted the hl-fix-cookie-domain-2 branch May 22, 2024 20:05
michenly pushed a commit that referenced this pull request May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants