Add Composite to cart using URL
-
I am trying to programmatically add a composite product to my Woocommerce cart by making a GET request to “https://yourdomain.com/?add-to-cart=3111&quantity%5B1803%5D=5&quantity%5B1903%5D=2” as described in https://www.businessbloomer.com/woocommerce-custom-add-cart-urls-ultimate-guide/ .
How would I go about this with “WPC Composite Products for WooCommerce”?
I saw that someone used “?add-to-cart=ZZZ&wccp_component_selection[XXX]=YYY” with “ZZZ” being the id of the composite product, “XXX” being the id of the component within the composite product and “YYY” presumably being the id of a product within the component “XXX”. Yet this seemingly doesn’t work for me as nothing is added to the cart.
Am I doing this correctly and if not, what can I do to make this work?Thanks in advance.
- The topic ‘Add Composite to cart using URL’ is closed to new replies.