BEATSTORE

Docs / BeatStore Contracts

Checkout agree and address

Contracts adds two required fields to checkout:

  1. A checkbox. The buyer confirms that they reviewed the license for this purchase and agree to the terms.
  2. An address field for the PDF ({CUSTOMER_ADDRESS}).

When the fields show

The fields show only when the cart has a line that will get a contract PDF. A line gets a PDF when all of these are true:

  • The offer has a template mapped to it.
  • The template is enabled.
  • The template has HTML.
  • The license for BeatStore Contracts is valid.

If the cart has no such line, the fields stay hidden. The order does not need them. A sample pack or merchandise item does not trigger the fields.

On the WooCommerce Checkout block, the fields appear or disappear when the cart changes. The buyer does not need to reload the page.

Supported checkouts

CheckoutWhere the fields show
Easy Digital DownloadsBefore the purchase button, and the address field after the user information
WooCommerce classic checkoutBefore the Place order button, and the address field after the billing form
WooCommerce Checkout blockIn the Additional order information section
BeatStore Player checkoutBefore the Player submit button (beatstore_checkout_before_submit)

The Checkout block uses the WooCommerce additional checkout fields API. This API needs WooCommerce 8.9 or later. If you use an older version of WooCommerce, switch the checkout page to the classic [woocommerce_checkout] shortcode.

Preview

Cart lines that have a mapped template can show View license. That loads a filled preview (demo buyer) so the shopper can read the terms before paying. On Easy Digital Downloads it sits next to the checkout line title. On WooCommerce it does the same on the classic cart, and on Cart / Checkout / Mini-cart blocks it shows as a details link on the line.

If checkout is blocked

The order does not complete until both fields are filled. The messages are:

  • You must agree to the license terms before placing your order.
  • Please enter your address for the license agreement.

On the WooCommerce Checkout block, WooCommerce can show its own wording for an empty address. The meaning is the same.

Where the answers are stored

  • Easy Digital Downloads: order meta beatstore_customer_address.
  • WooCommerce classic checkout: order meta _beatstore_customer_address.
  • WooCommerce Checkout block: the additional field beatstore-contracts/address. WooCommerce also saves the agreement answer.

Contracts passes the address into the PDF when it fulfills the line. If the address is empty, the PDF uses the billing address on WooCommerce.

The WooCommerce thank-you page shows both answers.