=== Jeet Sanwal Artwork Approval for Orders ===
Contributors: jeetsanwal
Tags: woocommerce, artwork, proof, approval, orders
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Requires Plugins: woocommerce
Stable tag: 1.0.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A revision-bound artwork proof and explicit customer approval record for WooCommerce orders. Free, with no ads or paid tier.

== Description ==

"Looks good" is useful. Knowing exactly which proof looked good is even better.
Jeet Sanwal Artwork Approval for Orders keeps a current proof revision, an explicit
decision and up to 20 earlier revision records beside a native WooCommerce order.

Author: Jeet Sanwal
Website: https://jeetsanwal.in
Plugin: https://jeetsanwal.in/tools/jeet-artwork-order-approval

Staff with manage_woocommerce and per-order edit permission publish an existing
Media Library attachment with a revision label and customer-visible note. The
native HPOS or legacy order metabox links to a separate form, so it never nests
forms in WooCommerce's order editor. Save other order edits before following it.

The logged-in positive order owner reviews and approves or requests changes from
My account > Orders > View. Requesting changes requires feedback. A decision is
final for that revision; staff publish a fresh revision to request another one.
The new revision clears the active decision and retains the earlier audit record.

Guest orders require a manual staff record with an explicit reviewer and
verification method. This is a staff record, not a customer's login signature.
There are no guest tokens, public approval links, emails, order notes, payment,
stock, production or order-status changes. Staff must handle notifications and
production workflow themselves.

IMPORTANT: WordPress Media Library files have public URLs. The approval screens
are restricted, but this plugin DOES NOT make files private, encrypt files or
control direct file downloads. Use only proofs that may be publicly accessible.

Supported proofs are existing, editable, local uploads on the site's exact origin:
PDF, JPEG, PNG, GIF, WebP and AVIF, at most 10 MB per file. A public URL must map
to the same local file. SVG, arbitrary URLs, remote/CDN URLs, missing files and
files outside the uploads directory are rejected. Upload files with WordPress's
normal Media Library first; this plugin does not create an upload endpoint.

The plugin records the attachment ID and a fingerprint of the local file bytes,
registered metadata and identity. Every decision and displayed current approval
checks the current proof again. Changed/missing files or metadata require a fresh
revision, so an older approval is not presented as approval of a changed proof.
This may reject proofs changed by image optimization or attachment metadata edits.
It does not make immutable file copies, back up proofs, validate artistic quality,
scan PDFs for malware, provide legal signatures or guarantee external file servers.

Records use WooCommerce CRUD for HPOS and legacy orders. POST nonces, exact current
state checks, per-order capabilities, ownership checks, atomic option-table locks
and storage readback protect workflow actions. WooCommerce v2/v3 order REST
responses omit this plugin's metadata; those REST routes cannot write or rename it.
Privileged plugins, database administrators and backups can still read the data.

Plain-text labels/reviewer fields accept 120 Unicode characters, notes/feedback
1,000. Up to 20 prior revisions plus the current revision are retained, including
their decision metadata; old file bytes are not retained. No frontend assets,
With optional installation reports off, remote calls, telemetry, signup, advertising, credits or paid edition.

== Installation ==

1. Activate WooCommerce.
2. Upload this individual plugin ZIP in Plugins > Add New > Upload Plugin.
3. Activate it, save an order and open Manage artwork proof in the order metabox.
4. Upload a suitable public proof in Media Library and copy its attachment ID
   from its Edit URL (post=123 means attachment ID 123).
5. Publish a revision with its label, note and public-file confirmation.
6. The customer logs in and opens My account > Orders > View, opens the proof,
   then explicitly approves it or requests changes. Staff verify and record guest
   decisions manually in WooCommerce > Artwork approval.
7. Install later self-hosted ZIP updates manually. The plugin has no updater.

== Frequently Asked Questions ==

= Are the proof files private? =
No. WordPress uploads retain public file URLs. Approval-screen access restrictions
are not file access restrictions. Do not use this plugin for confidential proofs.

= Does it support guest customer approval links? =
No. Staff verify a guest decision separately and record the reviewer, verification
method and explicit decision. Registered order owners use their existing login.

= What happens when a proof changes? =
Replacing the revision clears its active decision. Editing or replacing the same
attachment's bytes or metadata makes the current proof stale. Publish a fresh
revision after reviewing the change. Earlier decisions remain historical only.

= Does approval start production, mark payment or send an email? =
No. It changes only this plugin's order metadata. It does not automate fulfillment,
notifications, payment, stock, order notes or status.

= Why is my CDN or large proof rejected? =
Decisions are bound to locally verifiable bytes. Only registered local PDF/raster
uploads on the exact site origin, up to 10 MB, are supported. This avoids remote
requests and approvals based on an unverified offsite file.

= Is approval a legal signature or an immutable document archive? =
No. It records a login owner's explicit decision, or an identified manual staff
record, against a proof fingerprint. Proof copies and legal certification are not
provided. Follow your own business terms and record-retention needs.

= What happens on uninstall? =
Deactivation and uninstall do not erase order records or attachments. They remain
in WooCommerce metadata and the normal Media Library. Remove sensitive business
records through your established retention procedures.

== Updating an existing installation ==

Download this plugin's individual ZIP from https://jeetsanwal.in/tools/jeet-artwork-order-approval . Make a normal site backup and try the update on staging first. In WordPress, use Plugins > Add New > Upload Plugin and choose Replace current with uploaded when WordPress detects the existing installation. Keep the same plugin folder; do not uninstall/delete the plugin as an update step. Confirm the displayed version is 1.0.4, then reopen the plugin's normal screen and check one representative workflow described above. Clear relevant page caches if public output remains stale.

Updates are installed manually; a matching Update URI prevents unrelated directory plugins from replacing this package, but does not provide an update service. If replacement fails, check hosting upload limits and write permissions before retrying. To roll back, replace the plugin files with your saved previous ZIP; file replacement alone does not restore database records or deleted files. Use your site backup when data restoration is needed. Read this plugin's retention notes before deliberately uninstalling it.

Author and support: Jeet Sanwal — https://jeetsanwal.in/contact

Text preservation fix: newly saved supported records now retain literal backslashes and quotes. Previously altered text cannot be reconstructed automatically; reopen and correct it from your original source when needed. Existing metadata formats are unchanged.

== Optional installation reports ==

Installation reports are optional and OFF by default. Installing, activating, or using this product does not submit a report. Administrators can choose consent separately for each product under Settings > Jeet Sanwal Reports. All product features remain available with reporting off.

After explicit consent, the client sends the website URL, a random installation ID, product/WordPress/PHP versions, reported state, and an observed activation timestamp when available to https://jeetsanwal.in/api/v1/plugin-reports. While that product is active and consent remains enabled, a daily WordPress cron check-in can update its last-known status. WP-Cron depends on site traffic and hosting; it is not a continuous monitor.

Pause stops future reports without deleting records already shared. Forget requests deletion of the remote installation entry and history, retrying deletion if delivery fails. Records automatically expire after 90 days without a check-in. The plugin does not send page content, files, database exports, administrator email addresses, or raw IP addresses. Server rate limiting keeps a keyed IP hash for up to 24 hours; ordinary hosting access logs are governed separately by the privacy policy.

Review the fields and consent before enabling reporting. Read https://jeetsanwal.in/privacy for the reporting endpoint, retention, and deletion details. Reporting does not authorize remote control, automatic updates, or access to the website.

== Changelog ==

= 1.0.4 =
* Updated the product display name to Jeet Sanwal Artwork Approval for Orders and retained the Jeet Sanwal author website.
* Added voluntary installation/status reports with per-product consent OFF by default, pause/forget controls, and documented fields and retention.
* Preserved existing identifiers, stored data, permissions, and earlier release history.


= 1.0.3 =
* Preserved literal backslashes and quotes in the first artwork record on legacy order storage; existing records and HPOS retain their normal format.

= 1.0.2 =
* Added a complete US English installation and update guide; kept documented permissions, limits and manual rollback steps.


= 1.0.1 =
* Clarified the manual replacement, verification and rollback workflow, with direct author support details.
* Rechecked package metadata, source/archive consistency and existing isolated regressions.


= 1.0.0 =
* Initial release: local proof revisions, customer decisions and verified staff records.
* Revision, file-byte and metadata binding with stale-state protection.
* Native HPOS/legacy order links, separate forms and bounded revision history.

== Upgrade Notice ==

= 1.0.0 =
Initial release. Use public artwork only; Media Library files are not made private.
