I'm building support to use custom domains on a WooCommerce store. Everything works except for the cookies being set by WooCommerce to track session data.
On the original domain (viaglamour), I can add a product to cart via ajax and the cart will seamlessly update with the new products. The correct cookies are set and updated to track the session. On a custom domain rendering the exact same store page, the cookies are never set causing the checkout, cart, and update functionalities to hang forever.
I've tried forcing AJAX requests to always go through the home domain, manually setting cookies, experimenting with CORS policies but I always return back to square one - the woocommerce functionality that depends on AJAX and JS doesn't work.
Original domain: https://viaglamour.com/cart/?add-to-cart=6936 (Fully works!)
Custom domain: https://learnlowpoly.com/cart/?add-to-cart=6936 (No cookies for woocommerce_cart_hash).
In both URLS ajax should be creating the session data and displayed (1) product.
I'm genuinely unsure if this is A) even possible B) the complexity of overriding WC core.