Installation
Update
Requirements
You must enable the coupons in WooCommerce settings:

The plugin has a built-in template editor which needs a minimal browser version:
- Microsoft Edge - 83.0.478.45
- Chrome Wersja - 83.0.4103.97
- Internet Explorer 11.0.9600.18860
- Opera 68.0.3618.156
- Firefox 77.0
- Safari 13.1.1
You should have allow_url_fopen ON and GD Support enabled in your server environment.
New coupon template
The first step after activating a plugin is creating a new coupon template which will be used during the process of generating coupons. You will use a convenient editor that is built-in in the plugin.
After installing the plugin, you will see in your WordPress dashboard menu a new PDF Coupons tab. Click on it and then choose the Add new option.
General
Select format - select the print size of the PDF coupon. Options:
- A4
- A5
- A6
Page orientation - Choose whether the coupon printout should be horizontal or vertical.
Background color - select a coupon background color.
Images
In this tab, you can choose which images you want to use when creating a coupon. The plugin uses the WordPress media library. To add images to your template, click Select images, then select images from the media library, and click Select. Finally, click on the image itself to add it to your workspace.

You can move images around the working area using the drag&drop method. The size of an image can be changed with one constraint - image magnification is possible up to the original resolution of the image.

Text
Here you will find three defined text headers that you can add to your workspace where you may edit them further.
In the current version of the plugin, you can edit:
- Font,
- Font size,
- Font color,
- Text alignment (left, right, center, and justify).

Shortcodes
The plugin supports a series of shortcodes, which allow you to place the value of the fields - when placing an order - directly to the coupon in PDF format.

Below you will find a list of all shortcodes:
- [coupon_value] - this is the value of the coupon which is also the price of the product - coupon,
- [coupon_code] - coupon code is a value generated automatically when creating an order with a product - coupon,
- PRO [coupon_expiry_date] - coupon expiry date,
- PRO [customer_address] - the payment address of the customer filled up when placing an order,
- PRO [customer_name] - buyer's name, filled-in at the checkout,
- PRO [product_name] - product-coupon name,
- PRO [recipient_message] - a message from a buyer to a coupon recipient. More about this option you will find in the section about adding a new product,
- PRO [recipient_email] - email address of the coupon recipient,
- PRO [recipient_name] - the name of the coupon recipient,
- PRO [siteurl] - address of your website.
Coupon templates list
Go to PDF Coupons → Templates. You will find here coupon templates - created by us to make your work easier and those that will add in the future.
Copy of the coupon template PRO
To create a copy of the coupon template, go to the template list, and click Copy. Then you will see the template editor, and you can make changes to the created copy of the template. Click Save template when finished.
If you do not save the template, it will appear in the coupon template list as a draft.
Settings
Go to PDF Coupons → Settings to customize the plugin.
General
- Automatically generate coupons - set an order status that must be reached to generate and send an email with a PDF coupon to a customer or a coupon recipient (PRO). You can also choose to generate the coupons manually by setting the Do not generate option,
- PRO Expiry date format - set the date format on your coupons by using
d/m/Y
. By default, the date format will be taken from WordPress's main settings., - PRO PDF as attachment - enable to add PDF coupons also as email attachments. If this option is disabled, recipients will only be able to download the coupon via a link in the email,
- PRO Coupon fields position on the product page - select where the coupon fields will be displayed on the product page (above or below the Add to Cart button). Below Add to cart button is the default option,
- PRO Coupon code - define your own settings for a coupon code. There are also similar settings on the product level for simple & variable products,
- PRO Coupon code prefix - set the prefix which will be used as the beginning of your coupon code. Leave empty if you don’t want to use the prefix. Use {order_id} shortcode if you want to use the order number,
- PRO Number of random characters - the number of random characters in the coupon code (for generating unique coupon codes). Choose the number between 5 and 30,
- PRO Coupon code suffix - define the suffix used at the end of generated coupon codes. Leave empty if you don’t want to use the suffix. Use {order_id} shortcode if you want the order number here.
- PRO Coupon value - Always use the regular price of the product for the coupon value.
- PRO Show field tips - Show tooltips for fields in PDF Coupon product.
- PRO Show textarea counter - Show character counter below text area. The maximum characters number in these fields is 250.
PHP Settings
In order for the plugin to work properly and the generated links enable downloading PDF files, the allow_url_fopen function must be enabled on your server. This feature is enabled by default on most shared servers. Scroll down to the PHP Settings section. You will see the current state of allow_url_fopen on your site. You should see a green message:
If allow_url_fopen is disabled, you can do one of the following:
htaccess
Open the .htaccess file in the root of your website and add a line to it:
php_value allow_url_fopen On
php.ini
Create a php.ini file in the root of your website and put the line in it:
allow_url_fopen = 1
Server administration
Some shared hosting servers do not allow you to manually change the parameter by editing the files. In this case, log in to your server admin panel and look for the option to enable allow_url_fopen. In other cases, contact your service provider and ask for an activation of this parameter.
Product edit screen
In the product edition screen, check the PDF Coupons checkbox. Then you will see the plugin supported fields. The Virtual setting in the Product data will not be selected by default. Select this option if the product will be virtual and will not have traditional shipping.
Available fields are:
- Coupon template - select a template created in the PDF Coupons tab,
- PRO Define own coupon code - enable to set a new prefix, suffix, and the number of random characters and thus overwrite the plugin's or product's settings (for variations),
- PRO Recipient name - the field where a client will be able to enter the name of a person she/he wants to send a coupon to,
- PRO Recipient email - the field where a client will be able to enter an email of a person she/he wants to send the coupon to,
- PRO Recipient message - the field where a client will be able to write a message to a person she/he wants to send a coupon to,
- PRO Allow to multiuse - check this option if you want to allow a customer to spread the coupon value over several purchases. For example, a coupon worth $100 for two purchases of $50,
- Expiration time - with this field you will specify the validity period of the coupon (never, 7, 14, 30, 60, 90, 360 days, or a custom value),
- Allow free shipping - check if you want the coupon to provide free shipping. The coupon requirement for free shipping must be included in the shipping method,
- Products - Products for which the coupon will be used. Do not select any to apply to all products,
- Product Categories - Categories for which the coupon will be used. Do not select any to apply to all categories.
Fields will be visible on the product page if you enable them:

Price
You can set the coupon price in the General tab. You can also set the different prices for each variation of the variable product.
Thank You Page
If the voucher is created after the order has been placed, a link to download the order will be added to the order thank you page, like on the screenshot below:
Order edit screen

After placing an order with a coupon, a metabox of the Flexible Coupons PDF will be added to the order edition page. You can use such a metabox to:
- Generate a coupon,
- Download a coupon,
- View a coupon,
- Go to the coupon edit page.

Edit coupons
The plugin uses a built-in WooCommerce mechanism to create and manage coupons. After creating a coupon you can edit it by going to WooCommerce → Coupons and adjusting its parameters.
Sending the coupon to the recipient
PRO When the coupon is generated (automatically or manually), it will be sent to the coupon's recipient in the email. The link for downloading the PDF file will be included in the email content.

Disabling email notifications
By default, the plugin automatically sends an email with the coupon. To change this setting, go to WooCommerce Settings: WooCommerce -> Settings -> Emails:
The link to download the PDF coupon on the My Account page
If the coupon has been generated for the order, you will find a link to download it on the My Account page.
Go to the My Account page and choose the Orders tab. Open the order with a coupon.
Coupon Management
In Marketing → Coupons, you will find a list of all the coupons.
On the list you will find:
- Code
- Coupon type
- Coupon amount
- Description
- Product IDs
- Usage / Limit
- Expiry date
- PRO Flexible Coupon - The order number with a coupon
You can filter coupons by:
- Percentage discount,
- Fixed Cart discount,
- Fixed Product discount,
- PRO Show Only Flexible Coupons,
- PRO Show Only WooCommerce Coupons.
Roadmap
We plan to implement the following functionalities:
- User coupon limits,
- Editable e-mail content,