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

Error when trying to add product to cart. #53

Open
AUFrasier opened this issue Jan 6, 2021 · 6 comments
Open

Error when trying to add product to cart. #53

AUFrasier opened this issue Jan 6, 2021 · 6 comments

Comments

@AUFrasier
Copy link

I keep getting this error when I try to add a product to cart.
image

Please help.

@avidsapp
Copy link

avidsapp commented Jan 7, 2021

I'm getting this error too. Bump

@CiubancanCristian
Copy link

I guess you are authenticated, try relogging and see if it fixes it

@avidsapp
Copy link

avidsapp commented Jan 8, 2021

I resolved the error by changing the GATSBY_WORDPRESS_URL env variable to my WordPress backend url

@AUFrasier
Copy link
Author

AUFrasier commented Jan 8, 2021

@avidsapp I ensured that those values contained my backend WP url. Still not working. Have been stuck on this issue for the past few days. Perhaps it's an issue with where my sites are being hosted? My gatsby site has been deployed to AWS Amplify and my headless WP site is being host on WP Engine. DNS being managed by AWS Route 53. Any suggestions?

@avidsapp
Copy link

avidsapp commented Jan 8, 2021

Looks like CORS issue. Try adding a CORS plugin to your WordPress site that does Access-Control-Allow-Origin: * or add it to your proxy

@AUFrasier
Copy link
Author

Thanks! Found something that seemed to have solved the CORS related error. However, products still aren't being added to the cart. When I click "Add to cart" it stalls for a bit and returns another error (see screenshot). 😢
image

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

No branches or pull requests

3 participants