I created a custom button to add products to cart and I’m using this link:
http://signaturecarbone.s23528.liner7.atester.fr/panier?add_to_cart=91&product_id=91&variation_id=93&attribute_pa_typographie=oscine-bold&attribute_pa_contour=sans&attribute_pa_departement=15&attribute_pa_percage=avec&plaque=RR-158-RR&bavette=&quantity=1
It’s the cart page. Two days ago, this link was working and adding products to cart but it’s not anymore.
I tried deactivating all plugins (but WC obviously), testing with a non variable product, sending request via GET and POST, checking and non-checking all ajax buttons in settings but nothing will do.
I checked the logs which didn’t help either.
Does someone have an idea what to do?
Clicking this link should add product to the cart.
1 Answer 1
So I ended up making a workaround because I still have no clue what’s happening. I changed the url to point to the product page and I’m using ol’good PHP to get the values and add the product with WooCommerce API.
Here’s my code: