=== StickerSpace for WooCommerce ===
Requires at least: 6.4
Requires PHP: 8.0
Requires Plugins: woocommerce
Stable tag: 0.1.0
License: GPLv2 or later

Connect an embedded StickerSpace editor to your classic WooCommerce cart and orders.

== Pilot scope ==
- CAD, prices entered EXCLUDING tax, dedicated physical/simple sticker product.
- Classic cart and checkout shortcodes. Cart/Checkout Blocks are explicitly unsupported and blocked for sticker products.
- Normal WooCommerce gateways, tax rules, shipping methods and coupons remain in control.
- One cart item is one approved batch, potentially containing up to four designs. Sticker quantities are selected in the designer. Different proofs remain separate cart items.
- Session-bound server verification prevents a customer from submitting another customer's proof identifier.
- Secret API keys stay in the WordPress server option, not HTML/JavaScript/order metadata.
- Private admin proof/artwork downloads. The plugin's production PDF download requires a paid WooCommerce order.
- WooCommerce is the authority for payment/refund/fulfilment status. StickerSpace's immutable proof record remains approved_unpaid and is NOT a payment tracker. This release does not synchronize paid-order events back to StickerSpace.
- Artwork stays in StickerSpace; WooCommerce saves the proof references and approval snapshot. No public WordPress media uploads are created. Keep the StickerSpace connection active to retrieve files.
- Standard WooCommerce Order again is not supported for sticker items; customers must open the designer and approve a fresh proof.

Full merchant guide: https://stickerspace.mohissa.chatgpt.site/help/woocommerce.html
RIP and machine guide: https://stickerspace.mohissa.chatgpt.site/help/production.html

== Installation ==
1. Install the ZIP through WordPress > Plugins > Add New Plugin > Upload Plugin, then activate.
2. Open WooCommerce > StickerSpace.
3. In https://stickerspace.mohissa.chatgpt.site/dashboard create/select your store. Add your EXACT WooCommerce HTTPS origin in Store settings and enable the editor. Save your prices and materials.
4. On the Website embed tab, copy the store ID from data-store="...". In API keys, create a server key.
5. In WordPress select the SAME StickerSpace service origin. Paste the store ID and key. Leave the key field blank on later saves to preserve the saved key.
6. Click Create dedicated sticker product. It is a physical, taxable, published, catalog-hidden product. Configure its shipping class/weight if your shipping rules need them. The $0 catalog price is replaced only by a server-verified proof price; ordinary add-to-cart requests are blocked.
7. Enable the storefront checkbox and save.
8. Create a page with a Shortcode block containing [stickerspace].
9. Use classic [woocommerce_cart] and [woocommerce_checkout] shortcodes on the assigned cart/checkout pages. This pilot does not support the Cart/Checkout Blocks.
10. Confirm WooCommerce uses CAD, prices entered excluding tax, and the intended tax/shipping rules. Run a sandbox/test-mode purchase before accepting real orders.

Use stickerspace.ca as the service only once its HTTPS is active; the provided chatgpt.site service is available now. WordPress and the allowed origin must agree on www/non-www and HTTPS.

== Acceptance test before live use ==
Use a payment gateway's test mode (not a real charge):
- Guest customer: open designer, upload art, choose size/material/quantity, acknowledge quality warnings, approve, and reach cart.
- Confirm batch price against the approved proof; confirm tax, shipping and any intended coupon discount separately.
- Add a second different proof: prices must stay independent. Refresh cart and return in the same session; proof metadata should persist.
- Remove an item. Attempt to change batch quantity; this should be rejected. Change sticker quantity by creating a new proof.
- Complete test checkout. Check the order's sticker designs and approval details. Production downloads should appear only after WooCommerce marks the order paid.
- Verify customer-facing emails show design summaries but no API keys or private download URLs.
- Log out of WordPress and try an admin download URL: access must be denied.
- Repeat on a mobile device and with your theme/cache/security plugins enabled.

== Troubleshooting ==
- Designer refuses to open: check enabled settings on BOTH sites and the exact website origin. Check HTTPS, CAD, tax-exclusive input, dedicated product availability and the same service URL.
- Session expired: editor sessions last two hours. Reopen and approve a new proof.
- Proof added but redirect failed: retry; the same proof already in the cart is not added again by a sequential retry.
- API unavailable: checkout is blocked rather than accepting an unverified price.
- API key revoked: create a replacement for the same store and save it in WordPress. Do not paste keys into chat or public pages.
- Connection changed: older orders require their original store/service configuration for downloads.
- Payment/refund status is managed in WooCommerce, not the StickerSpace proof dashboard.

== Verification performed ==
PHP syntax and isolated hook tests, server proof validation/isolation tests, and editor/dashboard functional tests. A disposable local WordPress 7.1.2 / WooCommerce 11.1.2 / PHP 8.3 integration test passed on 2026-09-30 using SQLite and a fake gateway. It exercised actual plugin handoff, cart pricing, checkout, approval metadata and paid/unpaid PDF access. No real gateway, email-delivery, production-hosting or visual/mobile test has been completed. HPOS uses WooCommerce CRUD metadata APIs; full theme and gateway compatibility must be checked in staging.

== Privacy and external service ==
The editor connects to the configured StickerSpace service. Approved artwork, previews, specifications, approval wording/time, and entered customer contact details are stored there. WordPress holds its private API key and an order/cart snapshot of proof identifiers, specifications and approval. Merchant dashboard sign-in currently uses ChatGPT; shoppers do not need a ChatGPT account.

Configure customer-facing privacy/retention disclosures before launch. This pilot does not provide automated artwork deletion or a paid SaaS subscription. Deactivating/uninstalling preserves connection settings and existing order metadata so reinstallation does not silently break past orders.

== Changelog ==
= 0.1.0 =
First installable WooCommerce pilot for classic cart/checkout.
