Customize pdf vouchers with recipient fields support

“Customize pdf vouchers with recipient fields support” Documentation by “WPWeb”

Default Recipient Fields

By default, PDF Vouchers support four recipient fields, as below :-

  1. Recipient Name
  2. Recipient Email
  3. Recipient Message
  4. Recipient Gift Date

You can view them from Add/Edit Product page -> PDF Vouchers -> Gift Voucher as shown in below screenshot :-

Default Recipient Fields

Creating a new Recipient Field

Adding a new recipient field to pdf voucher is very simple, it is just two simple functions attached to WordPress hooks. The structure of the function looks as below :-

Adding this code in your child theme's function.php file or in custom add-on, will generate a new "Recipient From Name" section as reflected in below screenshot :-

Recipient From Name

That's it. On enabling this field and saving product, will show a text box will be reflected as shown in below screenshot :-

Recipient From Name

By default, plugin provides support for 4 types of recipient fields, as below :-

  1. text - Shows a text field, same as Recipient Name
  2. textarea - Shows a textarea field, same as Recipient Message
  3. email - Shows a Email field, same as Recipient Email
  4. date - Shows a Date field, same as Recipient Gift Date