Website Building » WooCommerce » How Do I Add a Product to Gravity Form in WooCommerce?

How Do I Add a Product to Gravity Form in WooCommerce?

Last updated on October 1, 2022 @ 4:38 pm

Adding a product to Gravity Form in WooCommerce is easy! Simply follow these steps:

1. Log into your WordPress Dashboard and navigate to the Forms section.

2. Select the form you wish to add a product to and click on the Edit button.

3.

Click on the Products tab.

4. Select the product you wish to add from the drop-down menu and click on the Add to Form button.

And that’s it! You have successfully added a product to your Gravity Form in WooCommerce.

PRO TIP: If you are using the WooCommerce plugin for WordPress, there is a risk that your products will not be displayed correctly in the Gravity Forms product field. This is because the WooCommerce plugin uses a different product ID than Gravity Forms. To avoid this problem, you need to add the following code to your theme’s functions.php file:

add_filter( ‘gform_product_id’, ‘woo_set_product_id’ );
function woo_set_product_id( $product_id ) {
return get_the_ID();
}

Kathy McFarland

Kathy McFarland

Devops woman in trade, tech explorer and problem navigator.