== Description ==
Adds a „Print Receipt“ action to WooCommerce orders. Sends a plain ESC/POS style text receipt to a configured PrintNode printer:
– Manual print via order actions.
– Automatic print on status „processing“.
– Removes diacritics / non-ASCII for better thermal printer compatibility.
– Adjustable line width (characters per line).
– Custom header (Store Name) centered.
– Editable footer (multi-line).
– Customizable labels: Order, Date, Name, Total.
– PrintNode API key & Printer ID stored in settings.
– WooCommerce logger used for errors.
== Installation ==
1. Upload the plugin folder to /wp-content/plugins/ (or place the files directly there).
2. Activate the plugin in WordPress > Plugins.
3. Go to WooCommerce > Print Receipt.
4. Enter:
– PrintNode API Key
– Printer ID
– (Optional) Store Name
– Footer Text (multi-line)
– Line Width (characters, default 32)
– Custom labels
5. Save changes.
6. In WooCommerce > Orders use the printer icon to send a receipt.
== Frequently Asked Questions ==
= Nothing prints =
Check API key, printer ID, and that the PrintNode client is running.
= Diacritics look wrong =
Plugin strips diacritics to improve ESC/POS output. Provide ASCII-safe product names or rely on fallback.
= Can I change line width for a new printer? =
Yes. Adjust „Line Width“ in settings (16–64). All wrapping/centering updates automatically.
= Does it print images or barcodes? =
No. Text-only ESC/POS style output (raw text).