Search

Email Attachments

This plugin allows you to upload files to a specific folder which is created by this plugin. These files can be independently selected to be sent as an attachment/attachments with the following (automatically generated) emails by WooCommerce (currently only those emails are supported which offer an attachment hook – maybe I’ll include some more possibilities in future versions):

  • Processing Order E-Mail
  • Completed Order E-Mail
  • Invoice E-Mail

To ensure optimal performance for your site, this plugin removes all its entries in the database and the uploaded files from the server on deactivation, if you do not want to use it any more. You have the possibility to keep all your settings and data for a later reactivation, if you like. You are also able to change the upload folder to any destination of your choice, at any time. In this case all already uploaded files are automatically moved, so you won’t loose any of them.

If you prefer to upload or delete your files via ftp manually, this is also possible and the files are automatically recognized and you can select them for attachments.

Only files present in the selected directory will be used as attachment, as the plugin checks the existance of the selected files.

An internal fallback to a default folder and an automatic upgrade of internal options to a newer version (if detected) ensures the high reliability and easy usage of this plugin.

Most of the code is based on modern OOP-Technics (object orientated programming) and ajax requests – this ensures a high stability of this plugin. In addition the possibility of interference with other plugins due to identical function names is very low.

Installing & Uninstalling ↑ Back to Top

The downloadable .zip package contains the following folders and files:

  • /documentation_attachments/english -> the file index.html in this directory contains the documentation to this plugin.
  • woocommerce_emails_attachments.zip ->This file can be used or a direct upload by WordPress. Alternativly you can unzip this file and upload the complete folder in your WordPress plugin directory (usually found in Your_Wordpress_directory/wp-content/plugins/) via ftp (e.g. use ftp clients like Filezilla).

To install, follow these steps:

  • Download the package and unzip it.
  • Upload the file ‘woocommerce_email_attachments.zip’ with WordPress

    or

    Unzip the file ‘woocommerce_email_attachments.zip’ and upload it manually as described above.
  • Activate the plugin (WordPress Dashboard ->Plugins -> ‘WooCommerce E-Mail Attachments (by Inoplugs)’ )
  • Go to ‘WordPress Dashboard -> WooCommere -> Settings -> E-Mail Attachments’. There you can change the default upload
    folder, if you wish to. Be aware, that it is up to you to choose a valid folder name.

To uninstall, follow these steps:

  • Go to ‘WordPress Dashboard -> WooCommere -> Settings -> E-Mail Attachments’.
  • Deselect "Delete all files and settings on deactivation" if you wish to keep your settings for a later reactivation.
    Otherwise all your settings and uploaded files will be removed permanently.
  • Deactivate the plugin (WordPress Dashboard -> Plugins -> ‘WooCommerce E-Mail Attachments (by Inoplugs)’ )

To upgrade to a newer version, follow these steps:

  • Go to ‘WordPress Dashboard -> WooCommerce -> Settings -> E-Mail Attachments’.
  • Deselect "Delete all files and settings on deactivation" if you wish to keep your settings for the new version.
    Otherwise all your settings and uploaded files will be removed permanently.
  • Deactivate the plugin (WordPress Dashboard -> Plugins -> ‘WooCommerce E-Mail Attachments (by Inoplugs)’) and delete the plugin files (via WordPress or manually)
  • Download the new package and follow instructions for the installation. If you decided to keep your settings, they will be recognised and
    your plugin will work again. Otherwise you have to proceed as after a complete new installation.

Alternativly you can follow these steps:

  • Download the new version.
  • Upload the new version to your website as described above (via wordpress or ftp).
  • The integrated fallback will recognise the new version and adjust all internal
    option variables to so that they’re compatible with the new version. All your selections will be set like before the update.

Using the plugin ↑ Back to Top

Using the plugin is quite easy. Please be aware, that due to compatibility reasons for different operating systems filenames on the server are converted to lower case and special characters may be eliminated by wordpress filters automatically.

Uploading, Selecting and Deleting Files:

You can use the integrated ajax file uploader:

  • Go to ‘WordPress Dashboard -> WooCommere -> Settings -> E-Mail Attachments’
  • Upload the files you want to use as attachments with the "Upload File" button. This opens the standard
    file selection window, where you can select a single file to upload. To upload more files, click the button again and repeat this process for each additional file. You get
    a report for every uploaded file (if uploaded was successful and the name of the file on the server).
  • Refresh the selection list with the "Reinitialize selection list" button to make the new uploaded files selectable.
  • For each E-Mail select the files you want to use as attachments
  • Click "Save Settings" – button at bottom

Alternativly you can do the following:

  • Upload the files you want to use as attachment via ftp into the upload folder
  • Go to ‘WordPress Dashboard -> WooCommere -> Settings -> E-Mail Attachments’
  • All your uploaded files are now available in the selection list. The names of your uploaded files will be adopted to the rules as for
    normal uploaded files (special characters will be removed, etc.). If you are missing a file, the name could not be changed and the file was deleted. In this case eliminate
    special characters or use the integrated "Upload File" option.
  • For each email select the files you want to use as attachments
  • Click "Save Settings" – button at bottom

To change selected files do the following:

  • Go to ‘WordPress Dashboard -> WooCommere -> Settings -> E-Mail Attachments’
  • All your uploaded files are available in the selection list
  • For each E-Mail select or deselect the files you want to attach
  • Click "Save Settings" – button at bottom

To permanantly delete files do the following:

  • Go to ‘WordPress Dashboard -> WooCommere -> Settings -> E-Mail Attachments’
  • All your uploaded files are available in the selection list
  • On the right side of the file name you’ll find a "X". If you click on it a window pops up and after
    confirming with &quotYes&quot the file will be deleted from the server and it’ll be removed from the selection list. It won’t be available as attachment anymore.
  • It’s not necessary to click the "Save Settings" – button at bottom !!

Changing the upload folder:

  • Go to ‘WordPress Dashboard -> WooCommere -> Settings -> E-Mail Attachments’
  • Enter the complete new server path (NOT a relativ path !!).
  • Verify your entry. Be sure that you use only valid characters, otherwise the new folder cannot be created. The path will be converted to lower case letters.
  • Click "Save Settings" – button at bottom.

The new folder will be created automatically, if it does not exist. On the first time activation of the plugin the following files are automatically created in the new folder. You are free to alter or remove these files, if you like.

  • "index.php" with a no browsing allowed message
  • ".htaccess" with a "deny from all" entry

All files in the old folder (including the above ones if present) are moved to the new folder and the old folder will be removed.

Back to the top