i currently work on a woocommerce v2.1.12 shop and it seems they chaged that behavior.
my ajax url to add items to the cart has to look like this:
?add-to-cart=[PRODUCT-ID]&variation_id=[VARIATION-ID]&attribute_[ATTRIBUTE-NAME]=[ATTRIBUTE-SLUG]&attribute_[ATTRIBUTE-NAME]=[ATTRIBUTE-SLUG]
example:
http://example.com/store/category/product/?add-to-cart=239&variation_id=240&attribute_pa_size=48-2&attribute_pa_color=gold
this adds a specific product to the cart and also sets the variation attributes in the cart.
you can even set the quantity by simply adding &quantity=[VALUE]
in the end this comes in handy since all these values are set inside the submit form / select fields, you just have to look those up..
Related Posts:
- How do I get WooCommerce to automatically recreate pages? [closed]
- Changing Woocommerce Product Description [closed]
- Function to Set Product type in Woocommerce [closed]
- how to redirect to my template
- Custom Shipping method not showing in checkout
- Show “Local Pickup” shipping method only for specific Woocommerce product categories [closed]
- Woocommerce Shipping module available only for type of products [closed]
- WP Crowdfunding customization [closed]
- WooCommerce – Adding Custom Order Without No Product [closed]
- Can’t create term for product attribute
- block countries from shipping to them in WooCommerce [closed]
- How to get subscription key or id using Woocommerce Subscriptions [closed]
- Manually add order item with fixed product_id in WooCommerce
- Add Product Subtitle to Woocommerce Product Page
- WooCommerce shop page orderby [closed]
- How can you include a theme template file from within a plugin (i.e. WooCommerce’s Shop page)?
- Reduce Drop down Menu Width in WordPress
- What are wsm tables for?
- New databes tables with – WooCommerce – for developers [closed]
- Change commission_status paid when withdraw_status vendor is completed
- CampaignMonitor for WooCommerce – Move subscribe button [closed]
- Change Product Addon price based on select Variation
- WooCommerce – Maximum qty per line per product
- Woocommerce Create custom product type with variations
- Remove /product/ from url. I want only category name then product name
- Pre booking doesn’t work with custom bootstrap modul in woocommerce [closed]
- Save custom attributes of product in woocommerce
- trying to get product category image in woo-coomerce
- WooCommerce search products between price range using WP_Query
- Exact Hook to payment methods
- Adding Static Image to WooCommerce Content-Single-Product template
- Get Every Key & Value from Array then Display All in New Line
- Get orders of a specific customer woocommerce
- wc_get_template new template does not showing up
- How to add a new column with text fields to WooCommerce Cart List?
- Woocommerce: limit user to see only the products he created
- How do I get the Payzone WooCommerce payment gateway plugin to show up in the settings? [closed]
- Error with get_price (and others) in self-written plugin to show price
- How to change WooCommece variation data programmtically [closed]
- .php file for woocommerce edit category? [closed]
- Woocommerce – WordPress Roles & Capabilities
- Advanced Custom Fields (acf) – Filter Relationship by Taxonomies not Post Type
- Search users with custom meta data
- WordPress Multi-Step Product Search
- Woocommerce Free shipping method [closed]
- dynamically create callback functions inside a for loop
- How to change layout of shop page in wordpress? [closed]
- How to get custom minimum price in Woocommerce
- WordPress Phone Field Check (use numbers, spaces and pluses)
- Can export gallery but can’t import it Wp all import
- Get product categories and add them to a custom taxonomy
- How to Get Category Name When Export Products
- woocommerce remove coupon link does not work
- Plugins to generate reflinks in WordPress
- product available stock day by day
- WoCommerce Cart is not showing pricing
- How to add label/badge on bookable product based on their booking status
- How to Fix WordPress multisite woocommerce 403 file error
- Adding discount functionality to the cart
- How to find the file path in WordPress?
- I have English words in Kurdish pages
- Google Maps for Woocommerce Checkout
- category page multiple products add to cart any plugin available for woocommerce
- Woocommerce Attribute price for non-variations
- “Enable Media Replace” plugin does not update serialized object in WPMeta
- Change Woo Custom Endpoint Titles from a Plugin
- Woocommerce functions in custom class, avoid errors
- Meta Key array building with multiple input values from fields
- Configuring default woo commerce login with modal popup
- Saving data only when payment is successful
- Fetching users data from REST API
- Automatically check “Enable stock management at product level” to the existing products?
- Change hook to add_action in a plugin class
- Template conflict with WC Payment Method
- Adding/ Removing actions for plugins
- Get value from an input field and pass into update_meta_data as $meta_value
- Unable to sync woocommerce variations
- How to allow customers to input a text as a product variation *and* charge per character?
- Run one-time script calling plugin functions
- Unable to show 4 products in a row
- WooCommerce doesn’t show UK countries in the shipping options [closed]
- Woocommerce quick checkout form [closed]
- Woocommerce Large Variations Shows Out of Stock Items [closed]
- WooCommerce custom query and paging: Not Found error
- Why does theme need woocommerce to show images / content on front page?
- how do I solve Installation failed: There has been a critical error on your website
- WooCommerce product prices not showing up correctly [closed]
- Am I allowed to resell WordPress Premium Plugins under GPL? [closed]
- woocommerce show cities state as dropdown list
- Override the plugin class and function
- Woocommerce Product Page Collapsible Box Using CSS
- How can I make a quotation engine like this website in WooCommerce?
- How to show image caption in Woocommerce gallery
- How to add a static image inbetween the product tiles on main shoppage woocommerce?
- wp_options Table keeps growing
- ShipStation WooCommerce Integration error
- Add Text in Single Product Page On a Specific Category
- Brands Filter Not Working For On Sale Products
- Can we install 3d product configurator into wordpress
- Change Custom WordPress Function [closed]