Skip to main content
Version: 1.x

Receipts on Your Online Store

Your WCPOS receipt templates aren't limited to the till. Online-store customers can view and download their order receipt or invoice from My Account or the order confirmation page, rendered with a custom template from WP Admin → POS → Templates.

Version notes

Storefront receipt access — the My Account button and the [wcpos_receipt] shortcode — ships with WCPOS 1.9.11. The Let customers download receipts setting and the Receipt template for customers picker described below were added in 1.9.12; on 1.9.11 the button is on by default with no setting to control it. Earlier versions only render receipts inside the POS.

This page is about customers downloading their own receipts

Cashiers and staff don't need any of this — the POS Orders screen already lists every WooCommerce order, including online orders, and can view, print, or email its receipt from the three-dot menu. This page covers the other direction: letting customers download the receipt themselves from your website.

My Account download button

The Receipt button is off by default. Turn it on under POS > Settings > General, in the Customers section: enable Let customers download receipts. Once enabled, logged-in customers see a Receipt button next to eligible orders in My Account → Orders, and clicking it downloads a PDF (receipt-1234.pdf) rendered with your receipt template.

The button appears for Processing, Completed, and Refunded orders — statuses where the order has been paid. Pending, cancelled, and failed orders don't show it. (A developer can change which statuses show it.)

You also need an Active receipt template — if no template is active there's nothing to render, so the button stays hidden even when the setting is on.

The shortcode is separate

The [wcpos_receipt] shortcode below works whether or not this setting is on — the toggle only controls the automatic My Account button.

The [wcpos_receipt] shortcode

To add a receipt link to the order confirmation ("thank you") page or the My Account → view order page, use:

[wcpos_receipt]

With no attributes, the shortcode detects the current order automatically on either page and renders a Download receipt (PDF) link. On other pages it outputs nothing. An explicit order_id only works for a logged-in customer who owns that order.

Attributes

AttributeDefaultWhat it does
order_id(auto-detected)Link to a specific order. Only works for logged-in customers who own the order.
link_textDownload receipt (PDF)The link text.
formatpdfpdf downloads a PDF; html opens the printable receipt view instead.
template(storefront default)Render with a specific template ID instead of the storefront default.
classwcpos-receipt-linkCSS class for the link.
id(none)HTML id for the link.

Examples

A download link on the order confirmation page:

[wcpos_receipt link_text="Download your invoice"]

A link to the on-screen (printable) receipt rather than a PDF:

[wcpos_receipt format="html" link_text="View your receipt"]

Render with a specific template — for example an A4 invoice template instead of your 80mm till receipt:

[wcpos_receipt template="123" link_text="Download invoice (PDF)"]

The template ID is the number in the template's edit-screen URL (post=123) in WP Admin → POS → Templates.

Which template do customers get?

Right below the toggle, Receipt template for customers chooses which template the download uses. It defaults to Use active receipt template, so customers get the same template your POS uses — change the active template and their receipts follow automatically.

To give online orders a different look, pick a specific template from the dropdown instead. The customer download then always uses that one, independent of the template a cashier selects from the till dropdown. If the customer template is a narrow thermal-style receipt, the PDF will be narrow too — for online orders you may prefer a full-page document, and the gallery's Invoice template is designed for A4/Letter.

Per-page overrides

The setting controls the My Account button. For a one-off link on a specific page you can still override the template with the shortcode's template attribute, or change it site-wide (including for the button) with the developer filter below.

Templates render from the same receipt data payload as the POS, so your logo, store identity, tax settings, and customisations all carry over.

Security

Receipt links carry the order's unique key — the same mechanism WooCommerce uses for its order confirmation pages — so guests who checked out without an account can still use the link from the confirmation page. Anyone without the link needs to be logged in as the order's customer. Explicit order_id shortcodes only render for the logged-in owner of that order.

Pretty permalinks required

Like all WCPOS checkout pages, the receipt URL uses WordPress rewrite rules. Sites using Plain permalinks (Settings → Permalinks) need to switch to any other permalink structure.

For developers

Three filters control the storefront surfaces. They layer on top of the settings above — useful for conditional logic the settings can't express (per-order, per-customer, and so on):

// Force the My Account Receipt button on or off, overriding the setting.
// The filter's default value is the "Let customers download receipts" setting,
// so you only need this to override it — e.g. show the button for one user role.
add_filter( 'woocommerce_pos_storefront_receipt_my_account_button', '__return_true' );

// Change which order statuses show the button (default: processing, completed, refunded).
add_filter( 'woocommerce_pos_storefront_receipt_order_statuses', function ( $statuses, $order ) {
$statuses[] = 'on-hold';
return $statuses;
}, 10, 2 );

// Use a different template for storefront PDF downloads, overriding the
// "Receipt template for customers" setting. Receives and returns the full
// template array (null when none is configured).
add_filter( 'woocommerce_pos_storefront_receipt_template', function ( $template, $order ) {
return \WCPOS\WooCommercePOS\Templates::get_template( 123 );
}, 10, 2 );

The PDF route itself is /wcpos-checkout/wcpos-receipt/{order_id}?key={order_key}&format=pdf — the same order-key-gated endpoint the POS uses for receipts, with format=pdf returning the rendered PDF instead of the on-screen view.