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

Attach Gift Card as PDF in Email

Last updated on December 11, 2024

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 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

The plugin requires an mPDF library to attach a PDF file to the email. 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, 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 is disabled by default. The plugin requires an mPDF library to attach a PDF file to the email.

WooCommerce Gift Cards -  Email settings
WooCommerce Gift Cards – Email settings
  • Once downloaded, click on the Click here hyperlink to activate the add-on. 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 the following mail.

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

Note: Purchasing a gift card does not automatically add its value to the customer’s store credit balance. To reflect the value in the customer’s store credit, the customer must redeem the gift card from the profile(My Account > Store Credit). Once redeemed, it will appear on the user’s store credit balance and manage store credit page.

Also, note that it is not necessary for the customer to redeem the gift card into the store credit balance. They can directly use the gift card at checkout, just like a normal coupon.

If you want to add store credit to a customer’s credit balance directly, you can do that from the Manage Store Credit tab.