=== ùrlar Invoice & Packing Slip for WooCommerce ===
Contributors: urlar
Tags: woocommerce, invoice, packing slip, tax invoice, pdf, print, documents, receipt, order
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 8.2
Stable tag: 2.3.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Generate professional tax invoices and packing slips for your WooCommerce orders. Print or save as PDF. Secure links for customers—no login required.

== Description ==

ùrlar Invoice & Packing Slip adds professional tax invoices and packing slips to your WooCommerce store. Customers and admins can view, print, or save documents as PDF. Links work without login—perfect for guest orders. Customize with your logo, store name, and tax ID.

= Features =

* **Tax invoices** — Description, price, qty, subtotal, shipping, tax, and total
* **Packing slips** — Item list with quantities for picking and shipping
* **Print or save as PDF** — One click to open; use your browser to print or save
* **Secure links** — Shareable URLs that work without login (ideal for guest orders)
* **Customizable** — Your logo, store name, tax ID/ABN, address, and tax label (ABN/ACN/VAT/EIN)
* **Order status** — Shows refunded, cancelled, and partial refund correctly
* **Easy access** — Admin buttons on order list and order detail; customers see links in My Account
* **Product bundles** — Supports WooCommerce bundled products

= Usage =

1. Install and activate the plugin
2. Go to **WooCommerce → Invoice & Documents** to add your logo, store name, and tax ID
3. Documents appear on order pages; customers can access from My Account → Orders

= Requirements =

* WordPress 5.8 or higher
* WooCommerce 5.0 or higher
* PHP 8.2 or higher

== Installation ==

1. Upload the plugin to `/wp-content/plugins/urlar-woo-documents/` and activate
2. Go to **WooCommerce → Invoice & Documents** to set your store name, logo, tax ID, and address
3. Flush permalinks: **Settings → Permalinks → Save**

== Frequently Asked Questions ==

= Can customers access invoices without logging in? =

Yes. Secure links work without login—essential for guest orders. Customers can share the link to view or download their invoice.

= How do I save documents as PDF? =

Click the invoice or packing slip link to open it in a new tab. Use your browser's print (Ctrl+P / Cmd+P) and choose "Save as PDF".

= How do I customize the invoice layout? =

Copy the template files from the plugin's `templates/` folder into your theme directory and edit them there.

= Is the plugin secure? =

Yes. Document links are encrypted and rate-limited. Only people with the link can access documents.

= Where are documents accessible? =

Admins see links on the order list and order detail pages. Customers see links in My Account → Orders. Document URLs are also available via the order object for email integrations.

== Changelog ==

= 2.3.2 =
* Address Label: ship Nunito Sans Black (900) as a true static font instead of falling back to Bold (700) — banner title, To:/From: tags, and recipient values now render at the heavier 900 weight in PDFs
* Registered as a second mPDF font family (`nunitosans-black`) because mPDF's per-family font struct only supports four styles (R/B/I/BI)

= 2.3.1 =
* Build: prune mPDF's multilingual fallback fonts (CJK, Arabic, Hebrew, etc. — ~80 MiB) from the released zip; the plugin only uses Nunito Sans with DejaVu Sans as a Unicode fallback. Resolves the Cloudflare Pages 25 MiB upload limit that blocked the v2.3.0 deploy
* No functional changes vs. v2.3.0

= 2.3.0 =
* New: Address Label (103×164mm) for thermal label printers — added as a third "Print" button on the order detail page only (not exposed in the order list or My Account)
* Layout modelled on Australia Post Parcel Post: branded black header band with store name + order ref + date, store logo strip, large boxed To: field stack (Name, Address, Suburb/State/Postcode columns, optional Country / Delivery Notes / Phone), and a From: return address pinned to the bottom
* Recipient phone (if present) and customer checkout notes (if present) included on the label
* mPDF page size, margins, and footer configured per document type so invoices/packing slips stay on A4 while labels render at exact 103×164mm
* Auto-flushes rewrite rules on version change so new routes activate without manually re-saving permalinks

= 2.2.0 =
* Update channel moved to self-hosted Cloudflare Pages (urlar-woodocuments.pages.dev/details.json) — replaces the GitHub Plugin Update Checker integration
* Update checker now loads lazily (admin / WP-Cron / force-check only) to avoid frontend overhead

= 2.1.6 =
* Open document links in same tab to avoid ad blocker blocking in new tabs (ERR_BLOCKED_BY_CLIENT)

= 2.1.5 =
* Add rel="noopener noreferrer" to document links to reduce ad blocker blocking inconsistency
* Revert to application/pdf for inline display (octet-stream caused downloads)

= 2.1.4 =
* Serve PDF as application/octet-stream to avoid ad blocker blocking (ERR_BLOCKED_BY_CLIENT)

= 2.1.3 =
* Add order notes to invoice (customer checkout note and customer-visible admin notes)

= 2.1.1 =
* GitHub update checker for automatic updates from repository

= 2.1.0 =
* Server-side PDF generation with mPDF
* Documents open as PDF directly in new tab
* Requires PHP 8.2+ and Composer dependencies
* Run `composer install` in plugin directory
* HTML view available at /invoice/html/ and /packing/html/

= 2.0.0 =
* Major improvements to UX and layout
* Live preview with real-time updates
* Individual address fields matching WooCommerce
* Customizable tax ID label (ABN/ACN/VAT/EIN/Custom)
* Professional invoice layout improvements
* Payment method display ("Paid via...")
* Balance Due always visible
* Enhanced security measures
* Browser print-to-PDF (lightweight, no dependencies)
* Self-contained CSS (no external CDN)
* Performance optimizations
* Bug fixes and stability improvements

= 1.0.0 =
* Initial release
* Professional invoice and packing slip generation
* Secure encrypted URLs
* WooCommerce integration
* Order status reflection

== Upgrade Notice ==

= 2.3.2 =
Adds Nunito Sans Black (900) for true heavy weight on the address label. Visual-only update — no breaking changes.

= 2.3.1 =
Build-only fix: trims unused mPDF fallback fonts so the plugin zip fits Cloudflare Pages' 25 MiB limit. Functionally identical to 2.3.0.

= 2.3.0 =
Adds the Print Address Label button on the order detail page (103×164mm). Rewrite rules auto-flush on activation — no manual permalink save needed.

= 2.2.0 =
Update channel moved to self-hosted Cloudflare Pages. No action required on existing sites — the next update check pulls from the new endpoint automatically.

= 2.1.1 =
GitHub update checker: plugin now checks for updates automatically when installed from the repository.

= 2.1.0 =
Requires PHP 8.2+. Run `composer install` in the plugin directory. Flush permalinks (Settings > Permalinks > Save) after upgrading.

= 2.0.0 =
Major version with significant improvements: Live preview, better layout, customizable tax labels, enhanced security, and complete self-containment. Recommended update.

= 1.0.0 =
Initial release

== Updates ==

Updates are served from a self-hosted Cloudflare Pages site (`urlar-woodocuments.pages.dev`) using the Plugin Update Checker library. Every push to `main` rebuilds the manifest + zip; WordPress sees the new version on its next update check (within 12 hours, or immediately via Plugins → Check for updates).

Release flow:

1. Bump the Version header in `urlar-woo-documents.php`, the `URLAR_WOO_DOCS_VERSION` constant, and Stable tag in this readme.
2. Commit and push to `main`. GitHub Actions tags `v{version}`; Cloudflare Pages rebuilds `details.json` and the zip in parallel.

To point a site at a mirror or staging channel, add to wp-config.php: `define('URLAR_WOO_DOCS_UPDATE_URL', 'https://your-mirror/details.json');`

See `docs/cloudflare-pages.md` for full deploy setup.

== Credits ==

Developed by ùrlar
Website: https://www.urlar.co/
Repository: https://github.com/im3speed/urlar-woo-documents

