Released Jul 08, 2021
EVENT_BEFORE_MATCH_CODE event for adding custom code matching logic. (thanks @superbigco).
Fix an error when generating PDFs and custom fonts, where the temporary folder isn’t writable (or created).
Ensure we register the discount adjuster via
EVENT_REGISTER_DISCOUNT_ADJUSTERS to fix some compatibility issues.
Fix vouchers being applied to new orders, when creating new orders in the control panel.
Released Mar 29, 2021
Add bulk voucher code generation page. (thanks @jerome2710).
EVENT_MODIFY_RENDER_OPTIONS event for modifying the DomPDF options during render.
Fix incorrectly using
fieldLayoutId for plugin settings, when fetching Codes’ field layouts. This could lead to some installs not generating voucher codes correctly upon checkout.
Released Feb 13, 2021
availableForPurchase options to vouchers.
Released Jan 22, 2021
Fix gift vouchers attaching to emails, even when disabled.
Change logging from
info when an order doesn’t contain a gift voucher.
Released Dec 12, 2020
Add more logging around post-checkout functionality.
Post-checkout functionality is now performed on
EVENT_AFTER_COMPLETE_ORDER rather than
Fix permission translation error.
Released Nov 26, 2020
Ensure critical errors are logged during the order complete event.
Fix critical errors preventing orders from completing correctly.
Released Nov 07, 2020
Fix potential error with
isVoucher and line item purchasables.
Released Nov 06, 2020
Add support to apply gift voucher from the control panel, when editing an incomplete order.
Add ability to attach gift voucher PDFs to Commerce emails.
Fix an error when no code is found when applying voucher codes.
Released Oct 08, 2020
Custom fields are no longer serialized in the snapshot of a voucher. Please use
EVENT_BEFORE_CAPTURE_VOUCHER_SNAPSHOT events to opt-in any custom fields you want serialized in the snapshot. This follows Commerce's behaviour.
Fix incorrectly serializing Super Table queries when taking a snapshot of Gift Vouchers when adding to the cart.
EVENT_AFTER_CAPTURE_VOUCHER_SNAPSHOT event not actually doing much.
Prevent code field layout ID from being creating multiple times when saving plugin settings.
Released Sep 18, 2020
Fix a potential security vulnerability where the last-created voucher could be redeemed by any user.
Replace hard coded currency with order currency. (thanks @yingban).
Released Aug 31, 2020
Add support for Craft 3.5 field designer for code elements.
Add support for Craft 3.5 field designer for voucher elements.
Now requires Craft 3.5+.
Now requires Craft Commerce 3.2+.
Released Aug 20, 2020
getEditableVoucherTypeIds not returning correctly.
Released Jul 30, 2020
Fix ErrorException from undefined variable uid. (thanks @jmauzyk).
Released Jul 29, 2020
Fix voucher site dropdown not working for multi-sites.
Fix share and preview button alignment for vouchers.
Fix live preview not working for vouchers.
Fix save-as-new-voucher not working correctly.
Fix voucher permissions to use UID instead of ID.
Released Jun 22, 2020
Add migration for potentially missing code field layout.
Fix usage of deprecated
Return cart errors for ajax-applying of voucher codes.
Released Jun 18, 2020
fieldsPath config setting. If you are using this setting for adding custom field content to your voucher codes, please update your templates. Use
input type="text" name="options[fieldHandle]" instead of
input type="text" name="options[<fieldsPath>][fieldHandle]".
Released Jun 15, 2020
Fix potential error when trying to save a voucher code without an amount.
Fix incorrect handling for code field layout.
Released May 10, 2020
Add project config support for voucher types.
Check to ensure Klaviyo Connect plugin is installed before doing any more checks. (thanks @brianjhanson)
Released Apr 16, 2020
Fix logging error
Call to undefined method setFileLogging().
Released Apr 15, 2020
File logging now checks if the overall Craft app uses file logging.
Log files now only include
POST additional variables.
Only allow editing of voucher types if editable.
Released Mar 16, 2020
Fix order and voucher columns showing incorrect values in the voucher codes element index.
Add “Original Amount” to voucher codes element index.
Fix currency symbol in voucher codes element index in some cases.
Released Feb 13, 2020
Fix missing order properties for PDFs generated in CP. (thanks @jmauzyk).
populateLineItem to work with Commerce 3.x.
Released Jan 29, 2020
Craft 3.4 compatibility.
Commerce 3.0 compatibility.
Released Jan 09, 2020
afterTax not working correctly.
Released Jan 09, 2020
registerAdjuster plugin setting to control when the adjuster should be applied. Valid options are
beforeTax (default) and
Released Jan 04, 2020
Add the ability to set field layouts for Voucher Codes. (thanks @Anubarak).
Add a field layout designer to the settings for Voucher Codes. (thanks @Anubarak).
Add an event
PopulateCodeFromLineItemEvent to set additional fields/properties when a new Code is created based on a Voucher/LineItem. (thanks @Anubarak).
Add an event to validate LineItem options for custom fields in the Code. (thanks @Anubarak).
Add a migration to include an initial empty
content record for all existing Voucher Codes. (thanks @Anubarak).
Add a new setting
fieldsPath that represents the path of custom fields in the LineItems options. (thanks @Anubarak).
Add additional Tabs for custom fields in the Voucher Code if there are any. (thanks @Anubarak).
Add a component
codeStorage for storing and receiving codes that are used. (thanks @Anubarak).
Add an interface for
codeStorage and the possibility to use custom classes/components. (thanks @Anubarak).
Add a class
Session for storing the used codes for an order in the session. (thanks @Anubarak).
Add a class
Order for storing the used codes for an order in the field layout in a Codes field. (thanks @Anubarak).
Add a new Code relation field type. (thanks @Anubarak).
Add template hook
cp.gift-voucher.voucher.edit.details (thanks @samuelbirch).
All codeKeys are now grabbed via
GiftVoucher::getInstance()->getCodeStorage()->getCodeKeys($order);. (thanks @Anubarak).
All codeKeys are now set via
GiftVoucher::getInstance()->getCodeStorage()->set($codeKeys, $order); or the
This will make sure you can add a VoucherCode in the CP. (thanks @Anubarak).
Use a custom controller to store the plugins settings ensuring the new Field Layout setting is stored properly. (thanks @Anubarak).
Fixed minor session issue. (thanks @Anubarak).
Display inactive Vouchers in the CP. (thanks @Anubarak).
Fixed a Bug that could occur when re-saving an order via job, Craft already closes the session before running the job -> the adjuster has no valid session. (thanks @Anubarak).
Fix missing date columns in code element index.
Fix voucher discount being applied after tax.
Fix incorrect multi-site URL redirection when switching sites for a voucher.
Released Aug 25, 2019
Fix incorrect migration.
Released Aug 25, 2019
Fix namespacing issue.
Released Aug 25, 2019
Add support for Klaviyo Connect plugin.
Add support for Commerce 3.
Adjust template functions
codes() to allow criteria as params.
Incorrect permission for voucher types.
Fix anonymous requests to gift voucher previewing.
Fix missing Commerce requirement.
Fix missing expiryDate column.
Fix voucher search indexes.
Fix lack of registering Code as an element type.
Add codeKey to searchable attributes.
Fix legacy codes (from Craft 2) not correctly being elements.
Fix lack of integrity constraint on codes.
Released Jun 01, 2019
Add override notice for settings fields.
price query params.
Fix error in element HUD.
Released Feb 27, 2019
Fix multiple tabs for voucher types not showing.
Fix “New voucher” layout issue when switching voucher types
Released Feb 19, 2019
Added “Don’t allow voucher codes to be used if discounts are applied on the order”. By default, discount codes and voucher codes can be applied to an order together, which may not always be desired. This setting honours the "Don’t apply subsequent discounts if this discount is applied" for discounts.
Released Feb 17, 2019
Fix migration issue from Craft 2 to Craft 3.
Released Dec 26, 2018
Include translation of Adjuster description. Thanks (@Anubarak).
codeKey to the element after storing the record to use it directly after the Code is created. Thanks (@Anubarak).
Add PDF config settings, rather than from Commerce.
Fix PDF paper orientation and size not changing from defaults.
Bring back missing
attach params for PDF.
Released Dec 14, 2018
beforeCompleteOrder as the event to generate codes, ensuring they can be used in emails.
Released Dec 14, 2018
Fix querying codes by voucherId not working.
Fix codes not being generated correctly after checkout completion.
Fix redemptions not being generated correctly after checkout completion.
Released Dec 01, 2018
Fix permissions for vouchers and codes.
Fix error occuring when installing plugin via command line
Released Nov 10, 2018
Allow PDFs to be generated for single voucher codes.
Add type to snapshot data.
Fix Gift Voucher element field name.
Fix error when deleting a voucher.
Fix querying by
voucherId on a code.
Fix error when querying and saving vouchers.
Released Oct 26, 2018
Add product method for voucher for easy commerce compatibility
Add field data to line item snapshot
Codes are now generated after the order is paid, instead of when complete
Fix welcome redirect
Fix empty strings being able to validate vouchers (oops)
Released Oct 18, 2018
Fixed some deprecation notices
Fix redemption error for new codes
Released Jan 17, 2017
Redeeming multiple vouchers.
Added possibility to return Ajax in frontend controller.
Redeemed code managing.
Change DiscountAdjuster order to apply after tax discount.
Adjuster showing proper discount amount.
Available for Craft 3. Get it from the plugin store.