Skip to main content

WooCommerce Add to Cart for Elementor Pro Form

Updated over a week ago

This action requires Elementor Pro and WooCommerce.

With this action, you can automatically add products to the WooCommerce cart when a form is submitted. You specify which products to add by referencing a form field or by providing a static list of product IDs.


Usage

  1. Edit your Elementor Pro Form widget.

  2. Go to Actions After Submit and add "WooCommerce Add to Cart".

  3. Configure the action settings in the WooCommerce Add to Cart section.

Settings

  • Product IDs Source - Choose where to get the product IDs from: Form field or List.

  • Field ID - The ID of a form field containing product IDs. Use this with Select, Checkbox, or Radio fields where the values are WooCommerce product IDs. Visible when Source is set to Form field.

  • Product IDs - One or more product IDs separated by commas. You can also use Dynamic Tags. Visible when Source is set to List.

How It Works

When the form is submitted, the action reads product IDs from the configured source and adds each valid product to the cart. The action checks that each product exists, is purchasable, and is in stock before adding it. Products that fail these checks are silently skipped.

If a product is already in the cart, WooCommerce increments its quantity instead of adding a duplicate.
​

A maximum of 20 products can be added per submission.
​

Input Formats

The action accepts product IDs in several formats:

  • Single ID: 42

  • Comma-separated: 42, 56, 78

  • Line-separated (one ID per line)

Did this answer your question?