BEATSTORE

Docs / BeatStore Contracts

After purchase

When a line is fulfilled, Contracts fills the mapped template and writes a PDF. Contracts does not write a PDF for an unpaid order.

  • With the player: beatstore_order_line_fulfilled
  • Without the player: EDD edd_complete_purchase, or WooCommerce processing / completed

The write is idempotent on order_ref + commerce_ref. A second hook fire does not create a second file.

Where the file lives

New PDFs are private: uploads/beatstore-contracts/private/. The filename is a hash of the order and commerce refs. Download is ?beatstore_contract={token}, not a public URL.

Old agreement-pdfs/ files from Licenses & Contracts stay where they are. They are not moved.

Unpaid orders

Pending, on-hold, and failed orders get no PDF. The buyer gets no download link for them.

Bank transfer and other offline orders stay on hold until you confirm payment. When you mark the order paid, WooCommerce moves it to Processing or Completed. Contracts writes the PDF then.

Email

The receipt email is sent after payment is confirmed. Contracts adds the links only to paid orders.

Receipt emails do not include the links by default. The setting is off on a new install.

To add the links, turn on Add private download links to the purchase receipt in the contract settings. EDD uses the {contract_list} email tag. WooCommerce adds the same list after the order table in the email.

If you do not turn on the setting, the buyer still gets the links on the thank-you page. See the next section.

Order success / receipt page

Buyers also get the same token list on the page they land on after paying:

  • Easy Digital Downloads: the purchase receipt screen
  • WooCommerce: the thank-you / order-received page, and My Account → View order

Those screens always print the links when a PDF exists for the order. An unpaid order has no PDF, so the screens show no links. The email setting only controls whether the list is emailed.

PDF text and fonts

The PDF uses Helvetica for Latin text. Helvetica covers English, French, German, Spanish, Italian, Portuguese, and the other Western European languages.

If the contract text or the buyer data has other characters, Contracts uses DejaVu Sans for the whole PDF. This font covers extended Latin (Polish, Czech, Turkish, Vietnamese), Cyrillic, and Greek. The PDF file is larger when it uses DejaVu Sans.

Chinese, Japanese, and Korean characters are not supported. They print as empty boxes.

Prices in the PDF

{TRACK_PRICE} prints the amount the buyer paid, with two decimals (for example 499.99). {CURRENCY_SYMBOL} prints the plain symbol (for example $).

No template mapped

If the offer has no template, or the template is disabled / empty HTML, fulfillment skips that line. The sale and the buyer files still go through EDD or Woo.