Checkout Questions
Each product can ask up to 10 questions at checkout (Core Commerce → Products → Edit product → Checkout questions). Answers are saved with the order and appear in the new-order email.
- Text, long text, web address, email, number collect what you need to deliver.
- Checkbox add-on changes the price when ticked, such as
Express reviewfor+25. - Choice (pick one) gives each option its own price change, such as
Deals page,Deals page + newsletterfor+50, andSelf-servefor-20.
The checkout summary updates as the buyer chooses. Core Commerce recomputes the price on the server before sending the buyer to pay. The same amount is stored with the purchase terms, so a charge below plan price plus add-ons is never fulfilled. Coupons and tax apply to the new subtotal. A price can reach zero and skip payment, and a free plan with a paid add-on asks for payment. Add-ons show as separate lines in the order email and on the customer’s order page.
On subscription plans, the change applies to the first payment. If the first payment is higher than the renewal price, it is charged once and the license renews manually.
The stored format, used by the REST API, abilities and WP-CLI, is one question per line: Label | type | required | price. For example:
Site URL | url | required
Placement | choice | required | Deals page; Deals page + newsletter=+50; Self-serve=-20
Express review | checkbox | | +25
Show a question only when it applies
Fill Show when to ask a question only for some plans or after another answer. The checkout shows and hides it as the buyer answers, and the server applies the same rules, so a hidden question is never checked, saved or priced.
plan:pro,agencyshows the question only on those plan slugs.!plan:lifetimeshows it on every plan except that one.Delivery:Expressshows it when the Delivery question’s answer is Express. Match a choice by its option, a checkbox withyes, or leave out the value (Website) to match any answer.- Start a condition with
!for the opposite, and join conditions with&to require all of them:plan:agency & !Rush review.
A condition names another question by its label, in any letter case. A condition on a question that doesn’t exist is ignored, so the question shows. A question that depends on one the plan doesn’t ask is left out on that plan.
In the stored format, Show when is the fifth column: Label | type | required | price | show when, for example Rush notes | textarea | required | | Rush review.
Ask a form’s fields at checkout
Choose a form in Questions from a form to ask its fields at checkout, before the product’s own questions. Each field keeps its label, required setting, help text, placeholder, default option and show or hide rules, and a rule can name the form field or its label.
- Text, web address, email, long text, number, date and time fields become questions. Dropdowns and radio buttons become a choice, and a single checkbox or consent box stays a checkbox.
- Fields named for the buyer’s name or email are skipped, since checkout asks for them in Contact. File uploads and fields that take several answers are skipped too.
- Form fields don’t change the price. Add priced add-ons as the product’s own questions.
- Answers are saved with the order under each field’s label. The form’s own actions, such as its emails, don’t run at checkout.
The stored detail is checkout_questions_form, the form’s ID, and the REST API and abilities accept it with the product’s other details.