imranhsayed/gatsby-woocommerce-themes

Error when trying to add product to cart.

AUFrasier opened this issue · 6 comments

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

Please help.

I'm getting this error too. Bump

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

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

@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?

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

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