Home > Docs > WooCommerce Gift Cards > Attach Gift Card as PDF in Email

Attach Gift Card as PDF in Email

Last updated on August 25, 2023

Gift cards offer a convenient approach to gift giving, and the WebToffee WooCommerce Gift Cards plugin makes it easy to create gift cards and gift card products, among other additional features. One particularly noteworthy feature is the ability to attach the gift card as a PDF file to the email sent to the user. This guide provides instructions on enabling this feature. To activate it, follow the steps given below:

  1. Navigate to the Email settings.
  2. Activate the mPDF add-on.
  3. Enable Attach Gift Card as PDF option.
  4. Save settings.

Prerequisite

To attach a PDF file with the email, the plugin requires an mPDF library. Download and activate the WebToffee mPDF add-on for RTL and Unicode Support.

Attaching gift card as PDF

To enable the Attach Gift Card as PDF option:

  • From the WordPress dashboard, navigate to Gift Cards > General settings > Email settings.
  • Alternatively, if Smart Coupons for WooCommerce is installed, then navigate to Smart Coupons > Gift cards > General settings > Email settings.
WooCommerce Gift Cards -  General settings
WooCommerce Gift Cards – General settings

The Attach Gift Card as PDF option will be disabled by default. To attach a PDF file with the email, the plugin requires an mPDF library.

WooCommerce Gift Cards -  Email settings
WooCommerce Gift Cards – Email settings
  • Once downloaded, click on the Click here hyperlink to activate the add-on, and this will make the Attach Gift Card as PDF function accessible.
  • Enable the Attach Gift Card as PDF option.
WooCommerce Gift Cards -  Email settings
WooCommerce Gift Cards – Email settings
  • Click on Save to save the configuration.

Once a gift card is sent, the recipient will receive a mail as follows.

WooCommerce Gift Cards -  Recipient mail
WooCommerce Gift Cards – Recipient mail