WooCommerce AJAX cross domain add to cart

If you have enabled the CORS policy headers then you can directly add a product via link given below;

Site-url.com/?add-to-cart=PRO-ID&variation_id=ATTR-ID&quantity=1&attribute_YOUR-ATTR-NAME=ATTR-VALUE

Trigger this url for an ajax / windows location on an action in your javascript.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)