Add Fees To Conditional Fields
Certain field types can be set to allow fees to be added to the customer's cart based on the customer's response to those fields. This could be a great way to add on things like gift wrapping, a gift message, add a customized text to a product, or to offer some other personalized touch to the customer's order.
Fees are available to be added to the following conditional field types:
- Text Box
- Text Area
- Select Menu
When you select one of the above field types for your conditional field, a new option "Add Fee" will become available to you in the field settings.
When you check the "Add Fee" box, it will provide you with the options you need to complete in order for the conditional field to be able to collect fees from the customer.
- Fee Amount: Enter the amount that the customer should be charged to complete this field.
- Fee Type: There are three field types.
- Any text entered: This will charge the customer the Fee Amount if they complete this field with any entry. This is also the only option available for checkbox, select menu, and radio fields.
- Per letter: This will charge the customer the Fee Amount for each letter they enter into a text box or text area field.
- Per word: This will charge the customer the Fee Amount for each word they enter into a text box or text area field.
- Fee Label: This is the label that will be added to the checkout page, order confirmation, order emails, and elsewhere. It helps to enter a descriptive label here so the customer knows what they are being charged an additional fee for.
Charge Different Amounts For Select And Radio Button Options
When you set up a Select Menu or Radio field, you have the ability to create predefined options for the customer to choose from. These options may require a different fee to be added to the cart depending on what the customer chooses.
In order to accomplish this, you will put a comma separated list of fees in the Fee Amount section, which corresponds to the Select Options that you set up for the field.
For example, if you want to charge $5 for Option 1, $10 for Option 2, and $25 for Option 3, you would set it up like this:
In this case, a customer who chooses Option 1 from the select menu will be charged $5, because Option 1 is the first in the Select Options list and 5 is first in the Fee Amount list. A customer who chooses Option 2 from the select menu will be charged $10, because Option 2 is the second in the Select Options list and 10 is second in the Fee Amount list, and so on.
Repeated Field Fee Labels
WooCommerce requires a unique label for fees that are added to a customer's order. Since repeated fields will all have the same Fee Label, we add a number after the Fee Label, which corresponds to the order that field has repeated.
If a customer purchase three of a product that triggers a conditional field, and enters something in each of those three conditional fields the fee they will see will look like this:
- Fee Label  - $5
- Fee Label  - $5
- Fee Label  - $5
However, if you do not want the fee label to be shown with a number after it, there is an option to group fees for repeated fields. This option can be found on the WooCommerce > Conditional Fields > Settings tab.
This option will add up all of the fees for each field and only show the total to the customer. Instead of seeing three separate $5 fees, the customer will instead see one $15 fee.
- Fee Label - $15
There are a number of filters available that will let developers customize how the fees are calculated. See the related articles section below for links to these filters.