Go to Voucher Templates menu under the WooCommerce menu and click on Edit Voucher link
Click on Custom blok button to insert Custom block in Voucher Tempalte. After inserting it click on Edit icon of Custom block
Here is the list of Supported Shortcodes.
{redeem}
- displays the voucher redeem instruction.{sitelogo}
- displays the voucher site logo.{vendorlogo}
- displays the vendor logo.{startdate}
- displays the voucher start date.{startdatetime}
- displays the voucher start date & time.{expiredate}
- displays the voucher expire date.{expiredatetime}
- displays the voucher expire date & time.{vendoraddress}
- displays the vendor address.{vendoremail}
- displays the vendor email.{siteurl}
- displays the site url.{location}
- displays the location(s).{buyername}
- displays the buyer name.{buyeremail}
- displays the buyer email.{billing_city}
- displays the buyer's billing city.{billing_address}
- displays the buyer's billing address.{orderid}
- displays the order id.{orderdate}
- displays the order date.{productname}
- displays the product name.{producttitle}
- displays the product title.{productprice}
- displays the product price.{regularprice}
- displays the regular price.{codes}
- displays the voucher code(s).{qrcode}
- displays single QR Code for multiple voucher code(s).{qrcodes}
- displays separate QR Codes for multiple voucher code(s).{barcode}
- displays single Barcode for multiple voucher code(s).{barcodes}
- displays separate Barcodes for multiple voucher code(s).{recipientname}
- displays the recipient name for voucher code(s).{recipientemail}
- displays the recipient email for voucher code(s).{recipientmessage}
- displays the recipient message for voucher code(s).{recipientgiftdate}
- displays the recipient gift date for voucher code(s).{payment_method}
- displays the payment method of the order.{quantity}
- displays the quantity of the product item.{sku}
- displays the SKU of the product item.{productshortdesc}
- displays product short description.{productshortdesc-digits}
- displays product short description with define number of digits in shortcode. {variationname}
- displays the variation name.{variationdesc}
- displays variation description.{variationdesc-digits}
- displays variation description with define number of digits in shortcode. {discounted_amount}
- displays the discount amount offered( regularprice - saleprice ){productfulldesc}
- displays product full description.{productfulldesc-digits}
- displays product full description with define number of digits in shortcode. {productimage}
- displays the product featured image. If product is variable then it will display variation image. If the variation image is not set then plugin will take product featured image.{buyerphone}
- displays the buyer phone number.Adding our own shortcode support to pdf voucher is very simple, it is just one function attached to a filter. The structure of the function looks like this:
Replace the place holders with actual values and we get this