Skip to content

Attach Me documentation

Attach files to orders and products, send them with the emails, and fix the most common problems.

Getting started

  1. Make sure WooCommerce is installed and active.
  2. Install the plugin from Plugins → Add New, or upload it to /wp-content/plugins/vanquish-attach-me-for-woocommerce.
  3. Activate it on the Plugins screen.
  4. Open Attach Me → Settings. The tabs are General, Texts and Default options. Each tab is made of cards, and a bar to save or discard appears as soon as you change something.
  5. On Default options, choose what a new attachment starts with: the emails it is sent with, the order statuses it is available in, and the block of download links in the emails. Each card has its own Use for new.
  6. Open an order and add your first file in the Files & proofs box.

Files are always protected. Uploaded files sit in a folder closed to direct access, under an unguessable path. Every download goes through a signed link that checks whether the person placed that order or can manage the shop. There is no setting to turn this off.

Files on orders

On the order screen, the Files & proofs box has the tabs Files, Proofs / File approval and Message the customer. The last two are Premium.

  1. In the Files tab, drop a file on the list, or use Upload…, Media library or External URL.
  2. Give the file a Title and, if you like, a Description. The customer sees both next to the file.
  3. Under Send with, pick the emails the file is attached to.
  4. Open Access & limits to choose the statuses in Available when the order is. In other statuses the file is hidden.
  5. Click the row's own Save button.

Each file is a row that shows its type, its size and what is set on it. Open a row with Edit to change it. One row is open at a time.

Where the file comes from

  • Upload a file: stored privately, behind the protected download link.
  • Choose from the media library: the file keeps its public address in wp-content/uploads. Anyone who already has that address can open it.
  • Link to an external URL: shown as a link, never attached to an email. The plugin does not fetch files from other servers.

From the orders list

The orders list has an Attachments column with a Manage button, so you can handle the files without opening the order. There is a filter for orders With attachments or Without attachments, and a Delete attachments bulk action, which asks before it deletes. Turn the column on or off in Attach Me → Settings → General → Lists & My account.

Use the row's Save, not Update. The row's Save button sends the file in pieces. The order's Update button does not, so a large file can be lost there.

Files on products

Use product files for things that belong to the whole product: a manual, a size chart, a data sheet. Open the product and go to the Attachments tab of the product data box.

  1. Add a file the same way as on an order.
  2. Under Where the customer sees it, choose On their order, after buying, On the product page, before buying or Both.
  3. For the product page, pick a Place and, if you like, a Section, such as "Manuals". Files with the same section are listed together.
  4. On a variable product, use Variations to choose which variations the file is for.
  5. Under Send with, pick the order emails. A file shown only on the product page goes out with no order email.
  6. Click the row's Save. Updating the product also saves whatever row is open.

Layout on the product page

Set the shop default in Attach Me → Settings → General → Product page:

  • Where the files appear: In a tab of their own, Under the short description or After the "Add to cart" button. Each file can use Shop default or choose its own place.
  • Layout: Cards, side by side or List.
  • Sections: fold each section, so the customer opens it with a click.

For a block theme's product template, or any page, use the Product attachments block. It shows the current product's files, or any product's.

The products list has an attachments column and a Delete attachments bulk action.

Files beside the price in the wrong place? The two places beside the price follow the standard WooCommerce order. A theme that arranges the product summary its own way may put them somewhere else.

Files in emails and large files

Each file can go with the standard WooCommerce emails (processing, completed, invoice, refunded) and with custom emails that other plugins register. You choose them per file, under Send with.

The block of download links

The order emails can also carry a block with your own text and the download links. On an order, switch on Also add a block with all the download links to the WooCommerce order emails. Under Its text, and when it is added, write the Text shown above the links and choose the statuses in Add it when the order is. The links are listed under your text automatically.

The default for new orders is in Attach Me → Settings → Default options → Download links in order emails.

Large files

Files go up to the server in pieces, so your server's per-request upload limit is not the limit on what you can attach. The file row shows the largest size it accepts.

Many mail servers refuse a message over 10 to 25 MB, and then the whole email is lost. Set Attach Me → Settings → General → Emails → Largest file to attach. A bigger file is not attached: the email carries a download link to it instead. The No limit switch attaches files of any size.

File names. A file is shown, downloaded and attached under the name it was uploaded with. On the server it keeps an unguessable name. Email attachments need WordPress 6.2 or later for this.

Where the customer sees the files

  • Order page in My account: the order's files, and the files that came with the products they bought.
  • Order list in My account: a "View attachments" button on each order that has files. Turn it on or off in General → Lists & My account → Columns & buttons.
  • Thank you page: switch on Show attachments on the order received page in General → Order details page.
  • Product page: product files set to show before buying.
  • Emails: the attached files and the block of download links.

How each file is shown

In Attach Me → Settings → General:

  • Order details page → Position of the box: where the attachments box sits on the order page.
  • Order details page → Open files in: A new tab or The same tab.
  • How each file is shown → Type and size: shows, for example, "PDF · 2.4 MB" under the name.
  • How each file is shown → Image previews: a thumbnail for images, at the width and height you choose.

Moving from WooCommerce Attach Me! (CodeCanyon)

If you used the CodeCanyon plugin "WooCommerce Attach Me!", your settings, texts, product files and the files on every order are converted for you. Nothing of the old plugin is deleted.

  1. Install this plugin next to the old one.
  2. Go to Attach Me → Settings → Import old data. The tab only appears when old data is found.
  3. Click Start the import. The page shows one row per kind of data, with its state.
  4. You can close the page: the rest finishes in the background. An order you open in the meantime is converted on the spot.
  5. Check the result, then deactivate the old plugin.

Your files stay where they are on disk, and the old download links still work. Theme overrides you wrote for the old plugin, in a wcam folder, are still read.

Translations

The texts you wrote in the old plugin's settings (box title, buttons, "no attachments" message, product tab, My account button) are imported language by language. Since version 1.7.3, the phrases that did not change, such as "Attachments", "Download / View", "View attachments", "Approve" and "Reject", also use the translation you had made for the old plugin, for example with Loco Translate, where this plugin has none of its own. Nothing is copied: the old plugin can already be deleted. The rewritten phrases stay in English until you translate them (Loco Translate, text domain vanquish-attach-me-for-woocommerce) or change them in Attach Me → Settings → Texts. The Translations row of Import old data tells you whether a translation was found for your site's language.

Old links to guest orders. An old link to a guest order's file only works when it also carries the order key, as the links in the WooCommerce emails do. A bare old URL pasted in the browser is refused. The customer can follow the file from their own order page instead.

Troubleshooting

The email with the files never arrives

  1. Check the size of the files. Many mail servers refuse a message over 10 to 25 MB.
  2. Set General → Emails → Largest file to attach. Bigger files then go out as a download link in the same email.
  3. Check that the email is picked under Send with on the file.

A large upload fails or nothing is saved

  1. Save the file with the row's own Save button. It sends the file in pieces, so upload_max_filesize and post_max_size do not apply.
  2. If you saved with the order's Update button, the plugin tells you when PHP discarded the file because of post_max_size. Use the row's button, or raise post_max_size.
  3. Check the largest size shown on the file row. A file over it is refused with "That file is larger than this site allows."

The customer cannot see a file

  1. Check Available when the order is under Access & limits: the order may be in a status where the file is hidden.
  2. For a product file, check Where the customer sees it and Variations.
  3. On the thank you page, check Show attachments on the order received page.

Nothing happens when the customer clicks a file

Some ad blockers stop links that open in a new tab. Set General → Order details page → Open files in to The same tab.

Other questions

  • HPOS: the plugin works with High-Performance Order Storage and with the classic order storage.
  • Uninstalling: your settings, texts, attachments and files on disk stay. Only the scheduled events and caches are removed.

A media library file is public. A file picked from the media library keeps its public address, whatever you set on it. If a file must not be reachable by anyone who has its URL, upload it through the plugin instead.

Texts, templates and shortcodes

Texts

Every text the customer sees is editable in Attach Me → Settings → Texts: the section titles, the download buttons, the message when there are no files, the "View attachments" button. Leave a field empty to keep the plugin's text. Use the search, or Customised only to see what you changed. With WPML or Polylang active, you edit one language at a time; an empty language falls back to the default one.

The text above the download links in the emails is set in Default options and on each order. It accepts these placeholders (since version 1.12.0 every billing and shipping field too):

[customer_name]
[order_number]
[order_date_created]
[order_page_link]
[billing_first_name]  [billing_last_name]  [billing_company]
[billing_address_1]  [billing_address_2]  [billing_postcode]
[billing_city]  [billing_state]  [billing_country]
[billing_email]  [billing_phone]
[shipping_…]  the same fields for the shipping address

States and countries come out by name. Under the editor the five most used are chips: a click writes one in, and + more shows the rest. The same placeholders work in the messages written from the order and, in Premium, in the preset texts and the proof emails. The names are the old CodeCanyon plugin's own, so texts brought over from it keep working; [order_id] and [wcam_order_page_link] still work too. Developers can add their own with the vanam_email_placeholders filter.

Template overrides

Copy a file from the plugin's templates folder into a vanquish-attach-me folder in your theme, keeping the same path. For example:

your-theme/vanquish-attach-me/order/attachments-box.php
your-theme/vanquish-attach-me/product/tab.php
your-theme/vanquish-attach-me/product/attachment.php
your-theme/vanquish-attach-me/emails/attachments.php

The child theme is checked first, then the parent theme, then the plugin.

Copied premium/proofs.php before version 1.6.5? Copy it again from the plugin: the hooks for developers below are in the new one.

For developers (Premium)

The customer’s proof screen, on their order page, can be added to without overriding its template (since version 1.6.5). For example, to let the customer draw their corrections on top of the proof.

  • Action vanam_proof_customer_preview_after( $proof, $current, $order ): right after the preview of the version the customer is looking at.
  • Action vanam_proof_customer_form_fields( $proof, $order, $form ): inside the form of the answer ($form is 'answer') and of the message ('message'), before the buttons. What you print is sent with the form.
  • JavaScript event vanam_proof_card_ready, once per proof, bubbling up from its card. event.detail has proofId, orderId, version, status, fileUrl, fileName, isImage, canAnswer, canWrite, canAttach, card and preview.
  • window.vanamProofCustomer: get( proofId ); answer( proofId, 'approve' | 'changes' ), which opens that step of the answer; attach( proofId, file, 'answer' | 'message' ), which adds a file to what the customer sends, uploaded like theirs and with the same limits. It needs Let the customer add files to their answers and messages on (Settings → Proofs / File approval → Files from the customer).

For example: draw on a canvas over the preview, pass the drawing as a PNG to attach(), then call answer( id, 'changes' ). For a ready-made drawing tool, switch on Mark up instead (see Proofs and approval requests): it does not need the customer to be able to add files, while attach() does.

For other plugins, since version 1.6.3 (Upload Files uses them for “Send a proof”):

  • vanam_proofs_available(): whether proofs can be used right now (Premium installed and licensed).
  • vanam_get_order_proofs( $order_id ): the proofs of an order, each with id, title, status (waiting, approved, changes), version, ref and url.
  • In the admin, window.vanamProofs.openNew( { title, text, ref } ) opens the New file to approve form filled in, and the vanam_proof_created event (proofId, ref, orderId) says when the proof is saved.

These functions exist in the free version too, where they answer “nothing”: check them with function_exists() and require version 1.6.3 or newer. The full list, with the signatures, is at the top of the plugin’s includes/api.php.

Shortcodes (Premium)

The list, with a Copy button for each, is on the General tab. Each shortcode shows nothing unless the reader is entitled to that order, so it is safe on a public page.

ShortcodeShowsOptions
[vanam_order_attachments]The attachments box of the reader's most recent orderorder="123" for one order; empty="…" for the text when there is nothing
[vanam_download_link id="…"]A link to one file. Wrap text in it to use that as the link textorder="123"; the id is the one shown on the attachment in the order
[vanam_order_page_link]A link to the order itselforder="123"; with none, the reader's most recent order

After an update. In version 1.5.0 the templates premium/proofs.php and premium/proof-thread.php got new markup. Copies in your theme need the same changes.

Proofs and approval requests Premium

Send a file from the order for the customer to approve: a design, a print layout, a translation. They approve or reject it on their order page, and you write to each other. Every new version asks for approval again, and the whole history stays on the order.

  1. On the order, open the Proofs / File approval tab of the Files & proofs box.
  2. Drop a file, or use Upload… or Media library.
  3. Add a Title and, if you like, a Message the customer reads with the file.
  4. Check Approval options, which start with your defaults, then click Save.

The customer finds the file on their order page. With Add a "Files to approve" page to My account switched on, they also get one page with every proof of their orders.

Settings

In Attach Me → Settings → Proofs / File approval:

  • The order and the shop: Counts as approved when, Move the order to another status, Shop emails and Order notes.
  • Emails to the customer: File names open chooses where the file names in the email lead: The page to approve it (the default since version 1.11.0, with the file shown large), The file itself (as before) or Nothing: only the button. Attach the new version to the email sends the file with the email as well; it is off by default, and best left off, because most email apps show an attached image inside the email, where it cannot be approved. When they go: At once, or After 2, 5 or 10 minutes (2 by default), so that what happens on the order in the meantime goes in one email. It applies to the emails to the shop too.
  • Files from the customer: let the customer add files to their answers, with Files per message, Largest file and Allowed file types.
  • When the customer does not answer: Reminders and Automatic approval after a number of days, with a preview of what happens when. Applies to orders that are sets the statuses. Cancelled, refunded, failed and draft orders are always left out.
  • Order screen → The box opens on: the tab the Files & proofs box shows first on the order: The last tab used (as before), Files, or Proofs / File approval. For developers, the filter vanam_order_metabox_first_tab (the tab id, or an empty string for the last one used).
  • Buttons on the order page: colours for Approve, Reject and Send message. Empty follows your theme.

Mark up

The customer can draw their corrections right on an image or PDF proof (images since version 1.7.0, PDF since 1.9.0). Under the proof they find a Mark up button, which opens the file full screen: pen, arrow, box, circle and text, four colours, undo, redo and clear. The drawing becomes a PNG of the proof with the marks on it, and goes with their answer (Attach to my answer, which opens the request for changes) or on its own (Send as a message). You see it in the conversation, like the other files from the customer. On a PDF they move between pages with the bar at the top ("Page 1 of 6") or Page Up and Page Down, and can mark up to 10 pages: each marked page becomes its own PNG. The PDF must be a file on your site, not at another site's address.

  • Switch it on in Settings → Proofs / File approval → Files from the customer → Mark up (Let the customer draw on the proof). It is off by default, and works even when the customer cannot add files.
  • That switch is what every new file to approve starts with. Each file has its own, in its settings (the gear next to the proof on the order): Let the customer draw on this file (Mark up, images and PDF). Proofs made before version 1.7.0 follow the general switch.
  • The button and the two choices can be renamed in Settings → Texts, under Proofs.

An answer given on the phone or in person

When the customer approves or rejects a file on the phone, by email or in person, record it for them (since version 1.11.0). Under the reply box of the file on the order, click Mark as approved or Mark as rejected: the box asks to confirm, offers Email the customer about it, and what you wrote in the reply box goes with it as a note. The conversation, the order note and the customer's page say the shop marked it, and who did, and the order moves to another status as it would with the customer's own answer. A new version asks the customer to approve again.

Withdraw a proof

A file sent by mistake, or no longer needed, can be taken back without deleting it (since version 1.8.0). In the file's settings (the gear next to the proof on the order), next to Delete file, click Withdraw: the box asks Withdraw this file? and offers Email the customer about it. The customer can no longer answer it and it stops counting towards the order status, while its conversation stays. Restore puts it back as it was, and so does a new version.

In Settings → Proofs / File approval → Withdrawn files, The customer chooses whether they Sees it, marked as withdrawn or No longer sees it, and Email sets how the email switch starts. The texts (the "Withdrawn" status, the line under the file, the email) are in Settings → Texts.

Proofs in the orders list

A Proofs column in WooCommerce → Orders shows each order's files to approve and where each stands (to fix, waiting, approved, withdrawn), the ones to fix first, with the customer's unread messages marked as new. One click opens the order on its proofs. Switch it in Settings → Proofs / File approval → Order screen → Orders list; it is on, and appears once you have sent at least one proof. On a phone WooCommerce hides the extra columns of the orders list, so it does not show there.

Above the list, under the WooCommerce statuses, a second row of views (since version 1.10.0): Needs my action (a file sent back for changes, or an unread message from the customer), Waiting for customer (at least one file waiting and none to fix) and All approved (withdrawn files do not count). They combine with the status chosen above and with the search. In the same Orders list setting, Show a Proofs column in the orders list and Show the Proofs views above the orders list switch them on and off.

What a new proof starts with (for example Comment compulsory and The customer can write) is on the Default options tab. Every proof of every order is listed in Attach Me → All attachments → Proofs / File approval.

Emails are grouped. What happens in a few minutes on one order goes out as one email, so three files sent in a row make one email. The customer is told the date before a file is approved for them.

Why proof emails arrive a few minutes late

The emails about proofs leave a few minutes after the first event (2 by default, see When they go above), so that everything that happens on the order in the meantime goes in one email. They wait in WooCommerce’s queue: Tools → Scheduled Actions, hook vanam_proof_notify.

  • On a site with few visits, the queue runs only when someone opens a page, so an email can wait longer. A real cron job that calls wp-cron.php every minute or so fixes that; your host can set it up.
  • To change the wait, use When they go (since version 1.7.1). For developers, the filter vanam_proof_notify_delay (seconds; 0 sends at once, without grouping) starts from that setting and has the last word.

Works with Upload Files Premium

With Vanquish Upload Files for WooCommerce 2.6.0 or newer (free or Premium) and Attach Me Premium 1.6.3 or newer, the customer’s own file becomes the start of a proof.

  1. The customer uploads their artwork with Upload Files.
  2. On the order, you press Send a proof next to that file.
  3. The Proofs / File approval form opens here with a title and a message already written: choose the proof and save it.

The proof then works as any other (see Proofs and approval requests), and its state shows next to the customer’s file, for you and for your customer.

Bulk attachments, automatic email files and CSV import Premium

Go to Attach Me → Bulk attachments. The tabs are Products, Orders, CSV import and Clean up.

  • Products: one rule attaches a file to many products or categories. Choose All products, Only these or All except these, with or without child categories. The rule says how many products it reaches, and can be duplicated.
  • Orders: one file for the orders you pick by number, or for every order, such as terms or a warranty. It is shown next to each order's own files and sent with the emails you choose.
  • CSV import: one row, one link, for one order or one product (by id or SKU). The first line must be the headings, with a url column and an order_id or product column. Drag the file onto the page; comma, semicolon or tab separators are recognised. A sample file can be downloaded.

Each product and order lists the bulk attachments that reach it.

Automatic email files

In Attach Me → Automatic email files, click Add file to add a file to every copy of the emails you pick, whatever the order contains: terms on every invoice, a returns form on every completed order. This works with order emails and with account emails, such as new account or password reset. Nothing is shown on the order page.

Files only in the emails

A product file, or a bulk product rule, can go out with the order emails you pick and show nowhere on the site: not on the order page, not on the product page. Turn on Only in the emails under Send with; the row then shows the Only in emails chip.

Message the customer, preset texts and sent messages

In the Message the customer tab of an order, write an email, pick which of the order's files go with it, Preview it and click Send email. An order note records what went out. Since version 1.12.0 it can go to several addresses at once, separated by commas, semicolons, spaces or slashes: each one is checked, and a wrong one is named before anything is sent. Texts you use often go in Attach Me → Preset texts, and the Insert template button under every editor adds them where the cursor is.

Under the form, Sent messages lists every message you sent on that order, with its text and files: Use again puts it back in the form (since version 1.8.0). The list is deleted with the order and with the customer's personal data.

Keep automatic files small. An automatic file goes with every copy of the email. Keep it under 1 MB if you can, or set the largest file to attach in the General settings.

Expiry, limits, history and cleanup Premium

These settings are under Access & limits on each file.

  • Expires: Never, On a date, or Some time after the order. An expired file leaves the order page and its download link stops working.
  • Download limit: switch on Limit how many times it can be downloaded and set the number. Downloads by your own staff are not counted.
  • Customer must accept the terms first: the customer accepts your terms before the first download. Write the terms in Texts, under Disclaimer.
  • Who can download: Everyone with the link or Only some roles…, including Guests (not signed in). Available on product attachments and bulk product attachments.
  • Show a "Copy link" button: the customer copies the download link with one click.

To free disk space, switch on Delete expired files from the server in General → Files & history → Expired files. It runs once a day.

Download history

Each order shows whether the customer has downloaded each file, and when, with an order note the first time. No IP address or other personal data is kept.

My account → Downloads

Switch on Also list attachments on My account › Downloads in General → Lists & My account to list the files on the WooCommerce Downloads page too.

All attachments

Attach Me → All attachments lists every file attached to an order, newest first. Search by file, order or customer, see which files nobody has downloaded yet and which expire this week, and delete the ones you tick. Delete all expired removes every expired file at once. Product files and bulk attachments are not listed here. The Proofs / File approval tab lists every proof: waiting, rejected and approved.

Clean up old orders

In Attach Me → Bulk attachments → Clean up:

  1. Which orders: choose Orders placed before a period (3 months to 2 years ago) or a date, the statuses, and What to delete: attachments, proofs, or both.
  2. Review and confirm: the page says how many orders it is about. Tick I understand that these files cannot be recovered.
  3. Clean up: it works a few orders at a time. Keep the page open. If a request fails, you can carry on from where it stopped.

Use Repeat every day… to run the same cleanup every night. Each order keeps a note of what was removed. The orders themselves are not touched.

This cannot be undone. Closed orders are selected by default. Open orders may still need their files, so pick them only if you are sure.

Moving from WooCommerce File Approval Premium

Proofs are the successor of the CodeCanyon plugin "WooCommerce File Approval".

  1. Go to Attach Me → Settings → Proofs / File approval. The card Import from WooCommerce File Approval appears on any site that has its data.
  2. Leave Bring over its settings and preset answers as well on if you want them too.
  3. Click Import.

Each file becomes a proof on its order, with its conversation, the files the customer sent and the customer's answer, each with its date. File Approval kept no history of replaced files, so each proof starts with one version: the file as it is now. Nothing of the old plugin is changed or deleted, and you can run the import again: what was already imported is skipped.

A translation you had made for File Approval is reused the same way for the phrases that did not change, such as "Approve", "Reject", "Approved" and "Rejected" (since version 1.7.3); the card shows a Translations row.

The old customer files are still public. The originals stay in uploads/wcfa, where anyone with the address can download them. The import copies them into the protected folder. Once you have checked the proofs, you may want to delete that folder.

Still stuck?

Still no luck? Tell me what you set and what the customer sees, and I will look at it with you.

Get support