How to set gift card image for gift card template

By default, each virtual gift card created on the site has the image provided by the plugin. This image can be changed both by administrator, during the creation of the “gift card” product, and by user, during the purchase. Let’s see how.

Administrator side

Site administrator can easily override the default image of the gift card in product edit page, by selecting the new image in “Choose image” field.

gift card image

In the second instance, if no image has been selected, it will consider the product image that, if set, will replace the default one provided by the plugin.

Product image as gift card image

Product image as gift card image

User side

To give users the possibility to set a customized image for the gift card they are purchasing, it is essential to enable “Custom image” in the general settings dashboard.

design and images

In this case, users could insert a customized image through the “Customize” button.

Gift card information form

Users also have the possibility to select the image of the gift card in a gallery created and made available by the administrator. For further details read this post.

How to set a logo for gift card

The logo inserted in the gift card can be changed and/or hidden by setting up the fields of the “Template” tab, in the plugin settings dashboard.

Logo options

According to the style of the selected template, the position of the logo is different.

How to create design template for gift card

The plugin allows to insert and organize different gift card images in categories. The gallery could be available to users during the purchase of the gift card.
Let’s analyze all the essential steps to configure the gift card templates correctly.

First enable the “Enable photo gallery” option in the plugin settings panel. The option can be overridden from each product page.

template design

template design product

Go to “Media > Gift Card Category” and insert all the categories of gift card templates you want to create.

Gift card category

Insert a new image in the “Media library” and edit it. Choose media “list” display mode to get a better overview of the “gift card categories”.

Edit media

Select the category you want to associate with the image you have created.

Set category to media

Now users can select a template, using the “Choose design” button, they will see the templates you’ve made available.

Select template - User side

Gift card code pattern

A code will be associated to each gift card automatically, created based on the pattern previously set in YITH Plugins > Gift Cards > Code pattern. 

gift card code

Use ‘*’ as a placeholder that will be replaced by a random character. Leave blank for default pattern ‘****-****-****-****’.

The administrator can customize the pattern. For example, you can generate the codes with the pattern yith-****-**** where each “*” is replaced by an alphanumeric character. In this way, you will get the following codes:


If you are creating a new gift card from the backend, please make sure to insert a univocal code in conformity with the previously set pattern.

How to set an expiration for gift card

By default, the gift cards that have been created automatically will not have any expiration date.

If you want to change this behavior, go to plugin settings dashboard and set the validity of all gift card in the  “Gift card expiration date” entry.

You must set the value by months. For example, if you want all the sold gift cards to expire in twelve months, you must set the value as 12.

expiration date

The gift card expiration date is included in the email sent to the user.

Gift card email expiration

This setting is not retroactive and will be applied only to the gift cards created after editing the expiration.

If you want to, once the gift card is created, the admin can however change the expiration date on the single gift card.

General information regarding email sent with Gift Cards plugin

For all gift cards configured as a “virtual” product, coupon codes are sent to the user by email.

Email sending occurs as soon as the payment has been made, unless the user selected a specific date (during the purchase) for the delivery of the gift card.

Gift card code in email

Right inside the “Gift Cards” section, you can check the email status. The system will notify if the email has been sent correctly or if an error occurred.

Gift card list

In both cases the plugin allows you to resend the email.
You can also resend an email from the order details page, in this case the email will be resend for all the gift cards included in the order.

Gift card resend code

The email with coupon code will be sent to the recipient specified during the purchase.

By enabling the “BCC email” field(s) in the option dashboard, a copy of that email will also be sent to site administrator and/or buyers.

bcc email

Purchase notification

When a user places an order using the gift card, a notification email will be sent to the customer who previously bought that gift card.

Purchase notification email

You can enable the “Purchase notification” in the general settings page of the plugin.

purchase notification


How to customize emails sent using Gift Card plugin

The plugin adds two kinds of emails along with the WooCommerce default ones:

  • Dispatch the coupon: send the digital gift card to the email address selected during the purchase
  • Notification: an email sent to the customer when the purchased gift card has been used

Just like for any WooCommerce email, you can enable, disable or edit some of their settings from WooCommerce -> Settings -> Emails.

Email settings

How to override email templates?

Dispatch the coupon

To override and edit this email template, copy yith-woocommerce-gift-cards-premium/templates/emails/send-gift-card.php to your theme folder: yourthemefolder/woocommerce/emails/send-gift-card.php.


To override and edit this email template, copy yith-woocommerce-gift-cards-premium/templates/emails/notify-customer.php to your theme folder: yourthemefolder/woocommerce/emails/notify-customer.php.

PDF attachment

By enabling the “Attach PDF” option, a pdf file will be attached to the gift card code email, so the users are able to download the gift card.

attach pdf email

The user will find the PDF of the gift card template in the email as an attachment.

How to override templates

You can override from your theme all the templates that you can find in the plugin “templates” folder.

Override templates

To override the template from your theme, copy the file you want to change and paste it in the theme woocommerce folder (create one if not already available.

If the file you want to override is in a sub-section of the plugin templates folder, make sure of recreating the same structure in the theme woocommerce folder.

Let’s make an example.
Suppose that we want to override the my-giftcards.php template.

The file is within the plugin in templates -> myaccount.

Plugin file structure

To override the file, you need to recreate the same structure within your theme and paste the file in the woocommerce -> myaccount path.

Theme file structure