View Categories

Custom fields on the Checkout block

2 min read

Checkout questions work on the WooCommerce Checkout block as well as on the classic checkout. A store can switch between the two: the answers are stored on the order the same way, so the order screen, the emails and My account show them as before. Requires Custom Fields 1.0.10 or later.

Where each question shows #

QuestionWhere it shows on the Checkout block
Unpriced text, text area, email, phone, URL, number, VAT, date, dropdown, radio button and checkbox fieldsAs WooCommerce’s own checkout fields. Billing and shipping positions go in the address forms (asked for each address and kept separately). Fields at the top of the form marked Editable in My Account go with the contact details. Every other position goes in Additional order information.
Priced questions, file uploads, multiple choices, time, colour and password fields, headings and messages, and the ID uploadIn the Custom fields section, below the contact information.

The Custom fields section #

  • It is added to every Checkout block page by itself, also to pages made before 1.0.10. You can move it in the block editor.
  • A priced answer shows its fee in the order summary as soon as the customer answers.
  • Files upload as soon as they are picked, are kept privately, and staff download them from the order screen.
  • Conditions work as on the classic checkout, also on answers to WooCommerce’s own checkout fields.
  • Problems show beside the question when the customer presses Place order.
  • Colour swatches, image tiles and buttons show as plain lists there (radio buttons, tick boxes or a dropdown), and the field width setting isn’t used.

What the order checks #

Placing the order is refused, with the classic checkout’s messages, when:

  • a required question has no answer;
  • an answer isn’t valid (an email address, a URL, a number);
  • an ID is required and the customer has none approved on file;
  • the damage waiver lines don’t match what the cart must charge.

Who a field is for (roles, cart contents and field groups) hides and shows it as on the classic checkout. A “contains” condition keeps the field visible and is checked when the order is placed.

The optional damage waiver #

An optional damage waiver shows as a tick box in the order summary of the Cart and Checkout blocks. Unticking it takes the waiver off the total.