WooCommerce Thermal Print Invoice self-updates
A WordPress plugin that prints WooCommerce orders as compact 58 mm thermal receipts. Designed for shops that staple receipts onto packages for delivery riders.
by Revamped GY · github.com/revamped-gy/woocommerce-thermal-print-invoice
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/revamped-gy/woocommerce-thermal-print-invoice/archive/refs/heads/main.zipShips its own WordPress updater (built-in updater), so new versions show up under Dashboard → Updates.
A WordPress plugin that prints WooCommerce orders as compact 58 mm thermal receipts. Designed for shops that staple receipts onto packages for delivery riders.
Features
- One click print from the WooCommerce order screen, the orders list and the customer's My Account page
- Tuned for 58 mm thermal printers, especially the JP-58H sold under brands like POS58D-UB and GOOJPRT
- Image rendering mode that draws the entire receipt to a bitmap before printing, so the print always matches the on-screen preview
- Floyd Steinberg dithered logo with contrast boost, for crisp 1 bit print of colour or greyscale source images
- CODE128 barcode of the order number printed below the footer for fast lookup and returns
- Two line shipping address printed prominently for delivery sorting
- Sample test print on the settings page so you can dial in fonts and density without burning a real order
- HMAC signed receipt URLs with a 15 minute expiry
- HPOS (High Performance Order Storage) compatible
- Auto update through GitHub Releases, no plugin marketplace required
Tech Stack
- PHP 7.4 or newer
- WordPress 5.8 or newer
- WooCommerce 6.0 or newer
- HTML 5 Canvas for the bitmap render path
- Standard browser print pipeline (no driver software required on the printing device)
Requirements
- A 58 mm thermal printer paired or connected to the device that prints the receipts
- A modern browser (Chrome, Edge, Firefox or Safari)
- WooCommerce active on the site
Installation
From a GitHub release (recommended)
- Go to the Releases page
- Download the
wc-thermal-print-invoice.zipasset attached to the latest release - In WordPress admin, go to Plugins then Add New then Upload Plugin
- Choose the zip you downloaded and click Install Now
- Activate the plugin
From source
- Clone or download this repository
- Copy the
wc-thermal-print-invoice.phpfile intowp-content/plugins/wc-thermal-print-invoice/ - Activate the plugin in WordPress admin
Configuration
After activating, go to WooCommerce then Thermal Receipt to configure.
| Setting | Purpose |
|---|---|
| Business name on receipt | The name printed in big bold letters at the top. Leave blank to use the WordPress site title. |
| Business phone number | Optional. Printed under the business name. |
| Show your logo | Prints the WordPress site logo at the top. Upload the logo at Appearance then Customize then Site Identity. |
| Customer details | Toggle the customer name, phone and shipping address block. |
| Payment method | Toggle the payment method line. |
| Product SKU | Toggle SKU under each line item. |
| Header note | Optional free text below the business name. Common uses: tagline, opening hours, social media handle. |
| Footer message | Optional free text above the barcode. Common uses: thank you message, return policy. |
| Open the print dialog automatically | Pops the print dialog as soon as a receipt page opens. |
Three configuration values are locked for the best print quality on supported hardware: paper width is fixed at 58 mm, the print engine is fixed to the browser print dialog, and the receipt format is fixed to bitmap image rendering. These cannot be changed in the settings UI.
Usage
Print a receipt from an order
- From the orders list, click the Print button in the Receipt column
- From an order edit page, click Print Thermal Receipt under the order details
- A receipt page opens in a new tab and the print dialog pops open automatically (if auto print is on)
Preview before printing
Each Print button is paired with a Preview button that opens the same receipt without auto firing the print dialog. Use Preview to confirm the layout before sending to the printer.
Test print without a real order
The settings page has a Sample Test Print section that prints a synthetic receipt with sample items, fees, customer note and barcode. Use this to test font sizes and printer density without burning real order data.
Print dialog settings
The first time you print, set the print dialog like this:
| Option | Value |
|---|---|
| Paper size | Custom 58 x 200 mm (or longer if your receipts are longer) |
| Scale | Default or 100% |
| Margins | None or 0 |
| Headers and footers | Off |
| Background graphics | On |
Most browsers remember these settings for next time.
Update Process
The plugin checks for updates from the GitHub Releases page every 12 hours. When a new release is published, WordPress shows the standard "Update available" notice. Click update and WordPress installs the new version automatically.
If you want to force an immediate check, deactivate and reactivate the plugin, or visit Dashboard then Updates.
To override the GitHub repository the updater pulls from, add this to wp-config.php:
define('WC_TPI_GITHUB_REPO', 'your-org/your-fork');
To turn the auto updater off entirely:
define('WC_TPI_DISABLE_UPDATER', true);
Security
Receipt URLs are signed with an HMAC token tied to the order ID and an expiry time of 15 minutes. The token uses the WordPress wp_salt('auth') value as the secret. If a receipt URL leaks, exposure is bounded to 15 minutes from when the URL was generated.
The receipt page sends Referrer-Policy: no-referrer, X-Robots-Tag: noindex, nofollow, noarchive and X-Content-Type-Options: nosniff headers to prevent indexing and referrer leaks.
To report a security issue privately, see SECURITY.md.
Troubleshooting
The receipt prints too small
Check the print dialog. Set Scale to 100% (not "Fit to page") and Margins to None. Some Android print dialogs default to "Shrink to fit" which silently makes everything tiny.
The receipt prints across two pages
This should not happen any more. If it does, the dynamic page sizing failed. Check the browser console for errors and confirm the receipt page contains a `