Knowledge Base

Hi, How can we help?

Using Conditional Logic in WooCommerce Product Addons to control the appearance of fields based on customer selections.

Overview
This document explains how to use conditional logic in a product addon form to control the appearance of fields based on customer selections. With this setup, certain fields will only appear when specific options are chosen, creating a cleaner and more user friendly product page.

Scenario

A store sells custom printed T shirts. Customers can choose the print style for their design.

There are two print styles:

• Text print
• Image print

If a customer selects Text print, they should see a field to enter the print text.
If a customer selects Image print, they should see a field to upload their artwork.

The form should automatically show or hide fields based on the selected print style.

Requirements

• Add a select field for print style
• Add a text area field for text based designs
• Add a file upload field for image based designs
• Show the text field only when Text print is selected
• Show the upload field only when Image print is selected
• Ensure the form updates automatically based on selection

This setup helps reduce confusion by displaying only the relevant fields to customers.

What This Configuration Covers

• Adding select fields to the addon form
• Setting custom labels and options
• Adding text area and upload fields
• Applying conditional logic to multiple fields
• Showing fields based on customer selections
• Saving and testing the configuration

Video Walkthrough

To see this configuration step by step using WooCommerce Product Addons, please watch the video below.

The video demonstrates how to create fields, apply conditional logic, and control field visibility based on customer selections.

Watch the video to understand the complete configuration process.

Customer Support

If you have questions about our plugin(s), are experiencing issues with any of our plugin