Customer invoice links

Updated

The Customer class adds Paddle’s invoice or receipt link for paid Paddle orders.

HookBehaviour
woocommerce_get_order_item_totals (20, 2)Adds an “Invoice:” / “Receipt:” row on the order-received page and in My Account; skipped in admin and inside emails
woocommerce_email_after_order_table (20, 4)Adds the link to customer emails (HTML and plain text), never to admin emails
template_redirectServes ?wpinterface-paddle-invoice={order_id}&key={order_key}

Customer::has_invoice() requires a paid Paddle order, hide_invoice_link not set, and a Billing transaction ID or a Classic receipt URL.

  • Classic: the link is the receipt URL stored from the webhook.
  • Billing: invoice URLs from GET /transactions/{id}/invoice expire, so the link points at the site. invoice_redirect() allows access with the matching order key (hash_equals()) or for the logged-in owner, fetches a fresh URL and redirects. Errors answer 403 (not allowed) or 503 (invoice not ready yet).

Was this page helpful?