Use this code recipe in combination with custom user fields to set up a checkout field that adjusts the membership price, either for the initial payment, recurring payments, or both.
Example Use Cases for Price-Adjusting User Fields
There are several use-cases that need this type of option that change’s your level’s price. Some ideas, to name a few:
- An association that publishes a quarterly magazine. Allow members to optionally pay extra to receive a physical copy via mail.
- A food-box or equivalent that has a frequency or quality selection, such as daily or 3 times a week OR good, better, and best.
- A health coach who wants to add an optional “weekly call” with the client.
- An education or online learning site that allows you to select one or more additional courses in your membership.

The Code Recipe
Adding the Recipe to Your Website
You can add this recipe to your site by creating a custom plugin or using the Code Snippets plugin available for free in the WordPress repository. Read this companion article for step-by-step directions on either method.
Duplicate lines 6-9 for as many fields as you want. The if(!empty($_REQUEST['option1']) || !empty($_SESSION['option1']))
line should be updated to the appropriate field name. You may also want to add a “hint” to the field so that your members know how their price will be adjusted based on their selection(s).