Vanquish Attach Me – Order & Product Attachments for WooCommerce
Full changelog. The readme carries the newer versions; this file keeps all of them.

== Changelog ==

= 1.9.0 =
* New (Premium): Mark up on PDF proofs too. The editor shows the PDF a page at a time, with "‹ Page 1 of 6 ›" to turn the pages (or Page Up and Page Down); the customer marks the pages that need changing, up to ten, each with its own drawing, and each page marked goes with their answer as a PNG of its own. Images work as before. The PDF is drawn in the customer's browser by pdf.js (Mozilla, Apache 2.0), included in the plugin and loaded only when someone opens a PDF to mark it up; scripts inside a PDF never run. Only files kept on your site, as for images.
* New (Premium): a "Proofs" column in the orders list, next to "Attachments": one short line per file to approve, a coloured dot, its name and where it stands — "to fix", "waiting", "approved" or "withdrawn" — the ones that need you first, with a blue "1 new" on those with a message from the customer you have not read. Past three, "+N more" shows the rest in place. Each name opens the order on its proofs. It appears once you have sent a proof, and can be switched off under Proofs / File approval › Order screen › Orders list.

= 1.8.0 =
* Fix: 1.7.3 could stop a whole site with a fatal error ("Call to a member function is_switched() on null") when another plugin made WordPress translate one of this plugin's texts very early, before the language settings were ready (reading the cron schedules on plugins_loaded is enough). Such an early text is now left as it is.
* New (Premium): withdraw a proof. A file sent by mistake, or no longer needed, is taken back without deleting it: the customer can no longer answer it, it stops counting towards the order status, and the conversation says when. Restore puts it back as it was, and so does sending a new version. Under Proofs / File approval › Withdrawn files: whether the customer still sees it, marked as withdrawn, or no longer sees it, and what the "Email the customer" switch starts as when you withdraw. Four new texts on the Texts tab, and a "Withdrawn" view on the Proofs screen once there is one.
* New (Premium): the messages you send from "Message the customer" stay on the order. Listed under the form, newest first, each opens on what it said and which files went, with "Use again" to put it back in the form; the tab shows how many. They go with the order, and with its personal data.

= 1.7.3 =
* New: coming from the CodeCanyon "WooCommerce Attach Me!" or "WooCommerce File Approval" on a shop in another language, the texts that did not change ("Attachments", "Download / View", "Approve", "Reject" and more) now use your old translation when this plugin has none of its own. Read from where WordPress and Loco Translate keep it (.mo or .l10n.php), so the old plugin can be gone; nothing is copied. The Import old data tab, and the File Approval import card, say whether one was found for your language.

= 1.7.2 =
* New (Premium): five more lines of the customer's proof screen on the Texts tab, under Proofs › On the order page › Approve & reject: the three hints that say a message is needed (to approve, to reject, with any answer), the line after a rejection ("We will send you a new version to check.") and the date a file will be approved on its own, with [date] where the date goes. The last one is also used in the reminder emails. Translations already made for these lines keep working.
* Theme copies of premium/proofs.php keep showing the old fixed wording for these lines until they are copied again.

= 1.7.1 =
* New (Premium): choose when the emails about proofs go out, under Proofs / File approval › Emails to the customer › When they go: at once, or after 2, 5 or 10 minutes. The wait gathers what happens on an order into one email; 2 minutes, as before, unless you change it. The `vanam_proof_notify_delay` filter still works, and has the last word.
* New (Premium): choose the tab the order's "Files & proofs" box opens on, under Proofs / File approval › Order screen: the last tab used, as before, or always Files, or always Proofs. A link to a tab still opens that tab.
* Developers: the `vanam_order_metabox_first_tab` filter sets the tab the box opens on.

= 1.7.0 =
* New (Premium): Mark up. Under an image proof the customer finds a "Mark up" button that opens the file full screen, with a pen, arrows, boxes, circles, notes, four colours and undo. The drawing is saved as a PNG of the proof with the marks on it, and goes with their answer or as a message, where you see it in the conversation. Switch it on in Proofs / File approval › Files from the customer; it works with customers' uploads off too. Images only for now, not PDF.
* New (Premium): Mark up file by file. The switch on the Proofs tab is what each new file to approve starts with; any file can have it on or off on its own, in its settings (the gear beside it on the order screen). Files sent before 1.7.0 follow the switch.
* New (Premium): three new texts for it on the Texts tab, under Proofs › On the order page › Mark up.

= 1.6.5 =
* New (Premium): developers can add to the customer's proof screen without overriding its template. The actions `vanam_proof_customer_preview_after` and `vanam_proof_customer_form_fields`, the `vanam_proof_card_ready` event, and `window.vanamProofCustomer`, which starts an answer and attaches a file to it: for example a markup tool that sends the customer's drawing with their rejection. They are listed in `includes/api.php`.
* Changed (Premium): the template `premium/proofs.php` has the new actions, and data attributes on each card. A copy in a theme needs them for the above.

= 1.6.4 =
* Changed: the plugin's homepage, linked from the Plugins screen, is now its page on vanquishplugins.com, with screenshots, plans and answers.
* Changed: the description says how proofs work with "Send a proof" in Vanquish Upload Files.

= 1.6.3 =
* New (Premium): other plugins can start a proof from their own screens. The "New file to approve" form opens filled in from a button of theirs, keeps a reference of theirs with the proof, and says when the proof is created; `vanam_get_order_proofs()` and `vanam_proofs_available()` let them show its state. Vanquish Upload Files uses them for "Send a proof" on a file the customer uploaded.
* Changed (Premium): an automatic approval fires the `vanam_proof_event` action like every other answer. It sends no extra email.

= 1.6.2 =
* New (Premium): "Only in the emails", a switch under the emails of a product file and of a bulk product rule. The file goes out with those emails and shows nowhere on the site. Files that arrived that way from the CodeCanyon plugin say so on their row, in the free version too.
* Changed: the plugin's icon has been redrawn.
* Fixed: a product file kept to the emails, sent as a download link because it was too big to attach, could not be downloaded from that link.
* Fixed: the message shown when the server drops a large upload named a "Save attachment" button that no longer exists.

= 1.6.1 =
* Changed: the plugin's icon has new colours, on the account and upgrade screens.

= 1.6.0 =
* New: the settings screen has been redrawn. Every tab is made of cards with one setting per row, numbers carry their unit, and a bar to save or discard appears as soon as something changes.
* New: the Texts tab is an editor in two panes. The texts are grouped in the order the customer meets them, each group says how many have been changed, and one search covers them all; "Customised only" shows what you changed, and each changed text has a button back to the default. On a multilingual site one language shows at a time, with the default language's wording under each field. The email texts have their placeholders as buttons.
* Changed: General asks "Show attachments on the order received page" the right way round, and "No limit" is a switch next to the largest file to attach. Your settings keep their values.
* Changed: Default options: each card keeps its own "Use for new", and "Available when the order is" and "Add it when the order is" ask for the statuses that show the file rather than the ones that hide it.
* Changed: Import old data shows what it found as one row per kind, each with its state.
* Changed (Premium): Proofs / File approval: reminders and automatic approval are two switches, their days are lined up with a preview of what will happen when, and "Applies to orders that are" replaces "Not for orders that are". Cancelled, refunded, failed and draft orders are always left out, as before.
* Changed (Premium): the shortcodes are a table, each with a Copy button.
* Fixed: on the Default options tab the editors of the download links text and of the message to the customer could show as a plain text box.
* Fixed (Premium): Default options said the wording of the terms was on the General tab. It is on Texts, and the link now goes there.
* Fixed (Premium): Import old data told the premium version that some data was waiting for the premium version. It now links to the screens where that data is imported.

= 1.5.0 =
* New: the screens where files are attached have been redrawn. On the order, on the product and in Premium's bulk attachments, automatic email files and preset texts, each file is a row that says what it is and what is set on it; one row is open at a time, and files can be dropped on the list. Emails and order statuses are picked as pills, switches replace checkboxes, and "Access & limits" says in its heading what it holds.
* New: the order's box is now "Files & proofs", in tabs: Files, Proofs / File approval and Message the customer. The switch for the download links in the order emails saves itself.
* New: the largest file to attach to an email (Settings → General → Emails). A bigger file goes out as a download link in the same email. 0, the default, attaches files of any size.
* New: "Delete attachments" among the bulk actions of the products list. It asks first, and so does the one in the orders list.
* New: placeholders under an editor are buttons that write themselves into the text.
* New (Premium): Clean up, a tab of Bulk attachments. Delete the attachments and proofs of orders older than a date or a period, by status: it counts the orders first, asks you to confirm, works in small groups and can carry on from where it stopped. One automatic rule can repeat it every night. Each order keeps a note of what was removed.
* New (Premium): proofs redrawn on both sides. On the order: one row per file with its status and last activity, a list of versions, the conversation, and "Attach a new version" in the reply box. For the customer: a larger preview that opens over the page, the list of versions, and an answer in two steps.
* New (Premium): a file to approve can be picked from the media library, and so can a new version of it.
* New (Premium): the files a customer adds to an answer go up in pieces with a progress bar, so the server's upload limit is not theirs. A file sent by a customer can be deleted from the conversation.
* New (Premium): preview a message written by hand before sending it, in your shop's email template.
* New (Premium): duplicate a bulk rule or a preset text. A bulk rule says how many products or orders it reaches.
* New (Premium): "Insert template" under every editor, in place of the "Load a preset text" list. The text goes in where the cursor is; it no longer replaces what was written. Preset texts can be searched.
* New (Premium): automatic email files choose between order emails and account emails, and a file is told when it is heavy for an email.
* Changed: a file is shown, downloaded and attached to emails under the name it was uploaded with, including the files already on your orders. On the server it keeps its unguessable name. Email attachments need WordPress 6.2 or later for this.
* Changed (Premium): the list of proofs moved from its own menu entry to a tab of All attachments. The old address still works.
* Changed (Premium): a bulk product rule applies to "All products", "Only these" or "All except these". "Only these" with nothing picked now reaches no product; rules saved before that had nothing picked still reach all of them.
* Changed (Premium): an automatic email file saved before its emails are picked is kept. It used to be dropped without a word.
* Changed (Premium): the templates `premium/proofs.php` and `premium/proof-thread.php` have new markup. Copies in a theme need the same changes.
* Fixed: uploading from the admin a file whose name had spaces or brackets failed with "Invalid file name."
* Fixed: "Delete attachments" in the orders list also deleted the files of that order's proofs.
* Fixed: "Delete attachments" in the orders list could end on a blank page when another plugin handles the bulk actions of that list too.
* Fixed (Premium): on a shop that keeps its orders in the classic storage, "Send email" in the message form did nothing.

= 1.4.0 =
* New: proofs / approval requests (Premium). Send a file from the order for the customer to approve; they approve or reject it on their order page, and you write to each other. A new version asks for approval again and keeps the history: every version, message and answer, dated, in one conversation. Proofs have their own card in the order's Attachments box and their own screen, Attach Me → Proofs, with what is waiting, rejected and approved across every order.
* New: the customer can add files to their answers and messages (Premium, off by default). Number, size and types are set on the new Settings → Proofs tab, and checked on the server.
* New: when the customer may write — whenever they like, once after each version or message of yours, or only with their answer — per proof, with a default.
* New: reminders when the customer does not answer, and automatic approval after a number of days (Premium). Each reminder is written into the conversation; the customer is told the date before a file is approved for them; both stop as soon as the customer writes back, until you answer.
* New: a "Files to approve" page in My account (Premium), with how many are waiting in the menu.
* New: emails about proofs are grouped: what happens in a few minutes on one order goes out as one email, to the customer or to you. The new version can be attached as well as linked.
* New: import from the CodeCanyon "WooCommerce File Approval" plugin (Premium), with its conversations, customers' files, answers, settings and preset answers.
* New: the answer buttons on the order page — Approve, Reject, Send message — each with a colour you can set, following your theme by default.
* New: a Suggest a feature page in the menu (Premium).
* Changed: customer approval set on an order attachment becomes a proof, automatically: the file is its first version, the customer's answer and comment its verdict, with their dates. Download links already sent keep working.
* Changed: the approval settings — order status, notifications, order notes — moved to the new Settings → Proofs tab, and the approval defaults on the Default options tab are now the defaults of a new proof.
* Changed: All attachments no longer has the "waiting for approval" view, and My Account → Downloads no longer has its approval column: proofs have their own screen and their own page.
* Changed: a CSV row asking for approval creates a proof.
* Updated: Freemius SDK 2.13.5.

= 1.3.0 =
* New: each product file can choose its own place on the product page — in the tab, under the short description or after the "Add to cart" button — or follow the shop default. The same for bulk product attachments (Premium).
* New: sections on the product page. Give files a section, such as "Manuals", and they are listed together under it; sections can start folded. A new compact list layout, one file per line, beside the existing cards (General → Product page).
* New: a Product attachments block, for a block theme's single product template or any page: the current product's files, or any product's, all of them or only those set to one place.
* New: All attachments (Premium). Every order's files on one screen, with search and views for files not downloaded yet, waiting for approval, expiring this week and expired. Delete one file, the ones you tick, or every expired file at once.
* New: bulk order attachments (Premium). One file for the orders you pick by number, or for every order, kept once in its rule and shown next to each order's own files and in the emails you choose. Approval, download limits and download history stay with files attached to the order itself.
* New: an order and a product now list the bulk attachments that reach them, under their own files, with a link to the rules (Premium).
* New: with WPML or Polylang, a bulk attachment's name and description can be written in every language of the shop, one field per language as on the Texts tab (Premium). A language left empty shows the default one.
* New: the CSV import (Premium) takes product rows as well as order rows: a product by id or SKU, with optional visibility, position and section columns. A variation gets the file on its parent, for that variation only. Drag the file onto the page; a comma, semicolon or tab separator is recognised on its own, and a sample file can be downloaded.
* Changed: "Bulk product attachments" and "Import from CSV" are now one menu entry, Bulk attachments, with Products, Orders and CSV import tabs (Premium). The old import address leads to its tab.
* Improved: on the products list, a paperclip heads the attachments column instead of a word that broke the table.
* Improved: an attachment's fields are grouped under small headings — Content, File, Who sees it and where — instead of being ruled off one by one, on the order screen, the product screen and the bulk product attachments screen.
* Fixed: on the product screen, "Where the customer sees it" sat glued to the emails below it.
* Developers: each file on the product page is drawn by a new template, product/attachment.php; product/tab.php arranges them. A copy of tab.php from an earlier version keeps working.

= 1.2.0 =
* New: each file's type and size under its name on the order page and the product page, as in "PDF · 2.4 MB". On by default; switch it off under General → How each file is shown.
* New: a product's files can sit under the short description or after the "Add to cart" button instead of in their own tab (General → Product page).
* New: download history (Premium). See on every order whether the customer has downloaded each file and when, with an order note the first time. The free version already records it, so the history is there whenever you upgrade.
* Changed: downloads by the shop's own staff are no longer counted. Opening a customer's link to check a file used to count as a download, and used up one of the customer's downloads on a file with a limit.
* Improved: the attachments box on the order screen is three separate sections — the files, the download links in the order emails, and the message to the customer — each with its own button. The email block's text and statuses only appear while it is switched on.
* Improved: customer approval offers Yes and No only (Premium). A submission with no answer and no comment is ignored, instead of sending the shop a "Not yet" note and email.
* Fixed: on sites hosted on Windows, an uploaded file was never attached: the upload finished, and the attachment was not created.
* Fixed: when saving an attachment failed, the reason is shown instead of "Something went wrong".
* Fixed: the message to the customer in the orders list's "Manage" window had no text editor (Premium).

= 1.1.0 =
* New: Default options tab. Choose the emails, hidden statuses and email block a new attachment starts with, for order attachments, product attachments or both. Premium adds defaults for customer approval, the download terms, the copy-link button and the manual message to the customer. Settings imported from "WooCommerce Attach Me!" now include its default options.
* New: an attachment's less common settings sit in a collapsible "Advanced options" section, and options that depend on another one only appear once it is switched on.
* Improved: "Bulk rules" is now called "Bulk product attachments" (Premium).
* Improved: the files offered in the manual message to the customer are switches, and can start all selected, with a confirmation before sending a message with no files (Premium).

= 1.0.1 =
* Fixed: on stores using the classic order storage (HPOS switched off), the importer counted every order as legacy data, showed the import notice on sites that never had the old plugin, and could keep running without finishing.
* Fixed: the automatic deletion of expired files (Premium) stopped after the first 200 orders with attachments.

= 1.0.0 =
* First release. A rewrite from scratch of the CodeCanyon "WooCommerce Attach Me!" plugin, with an automatic importer for its settings, product attachments and order files.
* Uploaded files are served from a protected folder through a signed, access-checked endpoint, always — not as an option.
* Chunked uploads, so the server's per-request limit is not the limit on attachment size.
* HPOS support, template overrides, and every customer-facing text editable per language with WPML or Polylang.
