*** Leat Changelog ***

2026-05-05 - version 3.5.9

* feature: Add contextual documentation links throughout the admin settings (header, every tab, onboarding steps and empty states) pointing to leat-docs.vercel.app
* fix: Not showing of per-tier perks in the Tiers List block.
* fix: Documentation link title attribute could break in translations containing apostrophes

2026-04-27 - version 3.5.8

* fix: Rare fatal error when activating the plugin alongside other plugins using the same dependencies

2026-04-23 - version 3.5.7

* fix: Spend rule type field rendered as read-only text instead of a dropdown select

2026-04-21 - version 3.5.6

* fix: Promotion rules not saving due to missing uuid parameter in REST request

2026-04-15 - version 3.5.5

* fix: Select fields (e.g. Gift Card Order Status) not restoring saved value after page refresh
* fix: Gift card email errors now show the actual API error reason in WooCommerce order notes instead of a generic failure message

2026-04-09 - version 3.5.4

* fix: Blocks not rendering when loaded via shortcode or outside post content (e.g. ACF fields, page builders)
* fix: Block default strings (buttons, messages, empty states) not translatable due to wrong text domain and missing i18n wrapping

2026-04-02 - version 3.5.3

* fix: Cache subscription types API response

2026-03-30 - version 3.5.2

* fix: Marketing consent subscription select not rendering its options
* feature: Add editable empty state text for the Earn Rules List block
* fix: Earn Rules List empty state styling inconsistent with other blocks

2026-03-30 - version 3.5.1

* dev: Fix build issues

2026-03-30 - version 3.5.0

* feature: Redesigned settings dashboard
* fix: Credits currency not respecting the "Credits name" setting, always showing "points"
* fix: Block editor strings not translatable due to incorrect text domain
* fix: Styling issues around save buttons
* update: Refresh translations for nl_NL and nl_BE
* update: Redesigned earn rules, webhooks, and promotions settings pages

2026-03-09 - version 3.4.1

* fix: Gift cards not being created correctly on stores with High-Performance Order Storage (HPOS) enabled
* fix: Vouchers not being created correctly on stores with High-Performance Order Storage (HPOS) enabled
* fix: Gift cards could be issued multiple times for the same order in some cases
* fix: Vouchers could be issued multiple times for the same order in some cases
* update: Improve performance of loyalty points display in checkout
* update: Improve checkout reliability when the loyalty API is slow or unavailable
* update: Improve Dutch translations on Gutenberg templates (patterns)

2026-03-06 - version 3.4.0

* feature: Mark rewards as "offline" to indicate to customers that they can claim this on location.
* fix: Fix debug toolbar assets not loading due to incorrect plugin root path resolution

2026-03-03 - version 3.3.1

* fix: Fix fatal error when moving attendees via Event Tickets — enqueue_admin_scripts now accepts nullable hook argument
* update: Replace exact API key length check with a minimum length validation to support variable-length PATs

2026-02-24 - version 3.3.0

* feature: Sell vouchers directly as WooCommerce products.

2026-02-12 - version 3.2.6

* feature: Add `[leat_content_block id="X"]` shortcode for rendering content blocks in page builders
* feature: Add "Shortcode" column to content blocks admin list table for easy copying

2026-02-03 - version 3.2.5

* fix: Include tax in order line items instead of sending as separate charge
* fix: Loyalty points refund errors now show actual API error message in order notes instead of generic failure message
* update: Shipping and fee charges now include tax amounts
* update: Default reward order parts now includes tax (B2C default)
* update: Increase log retention to 30 days

2026-01-26 - version 3.2.4

* fix: Gift card amounts showing as undefined in legacy WooCommerce checkout
* dev: Decrease logging

2026-01-26 - version 3.2.3

* fix: Improve loyalty points calculation

2026-01-23 - version 3.2.2

* feature: Add `leat_reward_order_statuses` filter to allow multiple order statuses to trigger points awards

2026-01-23 - version 3.2.1

* fix: Settings not changeable

2026-01-21 - version 3.2.0

* feature: New Rewards Checkout block for displaying and redeeming rewards

2026-01-16 - version 3.1.6

* dev: fix build

2026-01-16 - version 3.1.5

* fix: Promotion rule label not saving when using translatable text format

2026-01-16 - version 3.1.4

* feature: Add referral statistics cards to the Referral Rewards block showing referred and completed counts

2026-01-16 - version 3.1.3

* fix: Tiers List block not highlighting the current tier for enrolled users

2026-01-16 - version 3.1.2

*  dev: fix build

2026-01-16 - version 3.1.1

* fix: Remove DI container caching that could cause crashes on some production sites after plugin updates

2026-01-16 - version 3.1.0

* feature: Content Blocks system for displaying Gutenberg blocks at WooCommerce hooks
* feature: Points display with enrollment invitation for non-members on product pages
* fix: Referral codes not being attributed when new users sign up via order processing
* fix: Gutenberg editor not showing up on certain pages
* fix: Points Display block not rendering on WooCommerce Blocks checkout frontend
* fix: Resolved Store API namespace collision between PointsExtension and GiftcardExtension
* update: Improved security for Content Block rendering

2026-01-07 - version 3.0.3

* update: Loyalty Dashboard Page setting now enforces Gutenberg block editor even when Gutenberg-disabling plugins are active

2026-01-06 - version 3.0.2

* update: Improved error handling consistency across all REST API endpoints

2026-01-06 - version 3.0.1

* fix: Fixed gift card discount not being correctly applied to order totals during checkout
* fix: Resolved issue where WooCommerce would recalculate order totals and remove gift card discounts
* fix: Resolved dependency injection caching issue that could cause errors with WooCommerce Blocks
* update: Improved gift card total calculation logic to prevent double subtraction
* update: Enhanced compatibility with payment gateways to ensure correct amounts are charged

2025-12-30 - version 3.0.0

* feature: Added Gutenberg blocks for building custom loyalty dashboards
* feature: Added block patterns for quickly constructing loyalty pages
* feature: New Loyalty Heading block with dynamic content based on enrollment status
* feature: New Loyalty Paragraph block with rich text editing and variable support
* feature: New Join Program Button block for enrolling customers
* feature: New Earn Rules List block displaying ways customers can earn points
* feature: New Spend Rules List block showing available redemption options
* feature: New Coupons List block for displaying customer vouchers and coupons
* feature: New Referral Rewards block for sharing referral links
* feature: New Tiers List block showing loyalty program tiers
* feature: New Points Display block integration for WooCommerce Blocks checkout
* feature: New Giftcard Coupon block integration for WooCommerce Blocks checkout
* feature: Added "Loyalty Hero with Image" pattern for creating hero sections
* feature: Added "Earn Rules Section" pattern for pre-built earning opportunities layout
* feature: Added "Spend Rules Section" pattern for pre-built redemption options layout
* feature: Added "Referral Section" pattern for pre-built referral program layout
* feature: Added "Coupons List Section" pattern for pre-built vouchers layout
* feature: Added "Tiers Section" pattern for pre-built loyalty tiers layout
* feature: Added "Complete Dashboard" pattern for full loyalty dashboard setup
* feature: Added Loyalty Preview Sidebar for testing enrollment states in the block editor
* fix: Various bug fixes and stability improvements

2025-12-24 - version 2.5.5

* fix: Giftcard emails not being saved when using HPOS.

2025-12-05 - version 2.5.4

* fix: Fixed product search not working in promotion rules settings
* fix: Fixed continuous background polling on promotion rules page

2025-11-20 - version 2.5.3

* dev: Change tested up until WC version

2025-11-19 - version 2.5.2

* fix: Missing permissions for visiting the dashboard settings

2025-11-18 - version 2.5.1

* dev: Text domain change
* fix: Remove (optional) text from gift card checkout fields

2025-11-17 - version 2.5.0

* feature: Added promotional sale pricing for gift card products
* update: Fixed issue where variation gift cards used parent product pricing instead of variation-specific pricing
* fix: Fixed gift card amount calculation for product variations

2025-11-17 - version 2.4.12

* update: Improve security, and overall stability
* update: move the debug widget to a button in the ui so it doesn't permanently show in the order window

2025-11-05 - version 2.4.11

* fix: Gift card recipient email and message fields now display correctly in WooCommerce Block Checkout
* update: remove order meta display, this is handled by the debug chat

2025-11-04 - version 2.4.10
* fix: Fixed gift card email sending return type error that caused fatal error when API response was a string instead of array
* fix: Gift card refunds now work correctly even after the gift card has been partially used by the customer
* fix: Gift card amounts now correctly include tax to ensure customers receive the full value they paid (e.g., £5.00 gift card with 20% VAT now creates £5.00 gift card instead of £4.17)
* update: Refund logic now fetches and sorts all transactions to find the most recent one before reversal
* update: Enhanced Debug Toolbar to display comprehensive gift card information from order items including UUIDs, transaction details, and amounts
* update: Improved refund success validation with explicit object checks and reversal transaction UUID tracking in order notes

2025-11-03 - version 2.4.9
* fix: Fixed gift card email sending error that was showing checkout error message to customers despite successful order processing

2025-10-30 - version 2.4.8
* fix: Resolved gift card transaction creation issue that could prevent gift cards from being funded properly

2025-10-29 - version 2.4.7
* update: Added official WooCommerce High-Performance Order Storage (HPOS) compatibility declaration
* update: Added HPOS-specific hooks for gift card columns in order list admin
* dev: HPOS was already fully supported - this update simply adds the formal compatibility flag required by WooCommerce

2025-10-28 - version 2.4.6
* dev: Fix build

2025-10-28 - version 2.4.5
* fix: Store UUID in user meta if not already stored.
* fix: Dashboard not rendering even if already joined program

2025-10-27 - version 2.4.4
* fix: JS not being enqueued properly in WooCommerce account dashboard
* fix: Ensure we check if a contact can be accessed before updating attributes
* dev: Add better logging system, available via /wp-admin/admin.php?page=leat-logs

2025-10-27 - version 2.4.3
* feature: Use WC Blocks button for the points display.
* feature: Allow WC Blocks button te be changed in settings
* fix: Error when editing variations in a single product

2025-10-27 - version 2.4.2
* update: Manually add points display to the checkout via inner blocks.
* update: Settings for points display are not managed in the Gutenberg component.

2025-10-23 - version 2.4.1
* dev: Fix build

2025-10-23 - version 2.4.0
* feature: Show the amount of points the customer will earn in the checkout.
* feature: A smart widget to debug orders and users.
* update: Overall quality of life improvements

2025-10-23 - version 2.3.4
* fix: Fixed edge case where corrupted refund data could attempt to return more items than originally purchased
* update: Added quantity clamping logic to prevent over-refunding of loyalty points
* update: Improved refund validation with detailed warning logs for invalid refund quantities
* update: Better protection against data integrity issues from manual database edits or plugin conflicts

2025-10-23 - version 2.3.3
* fix: Fixed critical issue where order refunds could deduct more loyalty points than originally awarded
* fix: Fixed duplicate refund processing caused by WooCommerce firing multiple refund hooks
* update: Improved order return response handling for better reliability
* update: Added detailed tracking of returned line items per order

2025-10-23 - version 2.3.2
* fix: Fixed an issue where coupons sometimes were multiplying in the cart

2025-10-23 - version 2.3.1
* fix: Keep the same product identifier to ensure no duplicates are created during order

2025-10-06 - version 2.3.0
* feature: Added loyalty opt-in checkbox at checkout
  - Customers can now explicitly opt-in to the loyalty program
  - Works with both classic and WooCommerce Blocks checkout
  - Checkbox remembers customer's previous choice
  - Optional setting to show/hide for logged-in customers
  - Opt-in consent overrides "Only reward known contacts" setting
  - Customizable checkbox label with multilingual support
* feature: Added loyalty program status display in order admin
  - Shows customer opt-in status with contextual messages
  - Displays clickable link to view contact in Leat dashboard
  - Shows points awarded for each order
  - Displays enrollment status summary
* feature: Added product sync actions in WooCommerce product list
  - Added "Sync to Leat" row action for individual products
  - Added "Sync to Leat" bulk action for syncing multiple products at once
* update: Improved settings page with contextual help
  - Added explanatory alerts for how settings interact
  - Clearer guidance on opt-in behavior with authenticated users
  - Better explanation of "Only reward known contacts" interaction
* update: Improved order status messages for better clarity
  - More specific messages when customers aren't enrolled
  - Clearer distinction between legacy orders and opt-out
  - Contextual messages for logged-in vs guest checkouts
* fix: Fixed duplicate "Customer is not enrolled" order notes
* fix: Fixed points awarded not displaying in order admin
* fix: Fixed opt-in checkbox not saving correctly for WooCommerce Blocks checkout
* fix: Fixed contact UUID not saving for logged-in customer orders

2025-10-06 - version 2.2.5
* fix: Resolved critical error when processing gift cards with DateTime expiration dates
* update: Improved handling of multiple expiration date formats (DateTime objects, arrays, and strings)

2024-12-01 - version 2.2.4
* fix: Inactive gift cards can no longer be applied at checkout
* fix: Gift card balances are now deducted immediately when orders are placed, preventing double-use
* update: Improved error messages to prevent information disclosure about gift card status

2024-11-01 - version 2.2.3
* update: Improve how gift card calculations are handled, among other small changes and improvements

2024-10-01 - version 2.2.2
* fix: Prevent double discount application

2024-09-01 - version 2.2.1
* fix: Ensure unique id's for applied discounts per order

2024-08-01 - version 2.2.0
* update: Improve Giftcards to use WooCommerce fees instead of coupons
* fix: Prefix Composer packages to prevent conflicts

2024-07-01 - version 2.1.1
* update: Make the required WC version at least 9.5.0

2024-06-01 - version 2.1.0
* feature: Added WordPress filter-based custom field sync capability
* feature: New filter `leat_custom_attribute_definitions` to register custom attributes in Leat
* feature: New filter `leat_contact_custom_attributes` to sync custom field values for registered users
* feature: New filter `leat_contact_guest_custom_attributes` to sync custom fields for guest customers
* feature: New filter `leat_contact_core_attributes` to modify core attributes before syncing

2024-05-01 - version 2.0.3
* dev: Fix build

2024-04-01 - version 2.0.2
* fix: Fix an issue where charges sent to the Orders API were not recognized

2024-03-01 - version 2.0.1
* update: Several improvements to the new Orders API
* update: Integrate giftcards with webhook transactions for better real-time feedback
* fix: Webhoooks would sometimes be registered twice

2024-02-01 - version 2.0.0
* feature: Major order processing overhaul with the new V3 Order API
* fix: In some occasions there could be a fatal error on account creation for sites that are using WPML

2024-01-01 - version 1.8.2
* fix: Fix how data is passed to Gutenberg components for server side rendering

2023-12-01 - version 1.8.1
* fix: Assets not being enqueued correctly

2023-11-01 - version 1.8.0
* feature: Added Free Shipping voucher
* feature: Added [leat_referral] shortcode. Accepts these attributes:
  - show_share_button: "yes" or "no" (default: "yes") – Show share button
  - custom_class: Add custom CSS classes

2023-10-01 - version 1.7.1
* update: Update plugin description

2023-09-01 - version 1.7.0
* feature: Added automatic customer language tracking and synchronization
* feature: Tracks current language preference for each contact
* feature: Syncs language data with Leat for personalized communications
* feature: Works with WPML, Polylang, and standard WordPress locales
* update: Improved multilingual site support with better language detection
* update: Added filters for customizing language detection (`leat_languages` and `leat_current_language`)
* update: Simplified default dashboard title for logged-out users

2023-08-01 - version 1.6.5
* fix: Prepaid label missing for single products

2023-07-01 - version 1.6.0
* feature: Customers can now refer friends and family to your loyalty program
* fix: Fixed an issue where API requests would throw when tiers were requested

2023-06-01 - version 1.5.0
* update: Various small tweaks to UI
* fix: Fixed gift card amount calculation to properly handle variations and discounts
* feature: Added "Leat Support" role with restricted access to WooCommerce reports
* update: Improved gift card amount calculation to use correct totals

2023-05-01 - version 1.4.1
* fix: Various tweaks

2023-04-01 - version 1.4.0
* feature: Added multi-product reward selection. Customers can now receive multiple predefined products in their cart when claiming a reward
* feature: Introduced custom gift card messages in classic checkout. Add personalized notes to gift cards using the `{{ custom.message }}` merge tag in your Leat email templates
* update: Redesigned coupon code format. Replaced lengthy UUIDs with a shorter, more user-friendly format for improved readability
* fix: Optimized giftcard API interactions by preventing unnecessary calls during coupon processing and voucher synchronization

2023-03-01 - version 1.3.2
* update: Add video tutorials
* fix: Fix an issue where coupons sometimes would be set with no amount

2023-02-01 - version 1.2.2
* update: Improved multilingual support with better language detection and handling
* update: Added support for translatable text settings across multiple languages
* update: Added fallback mechanisms for missing language configurations
* fix: Fixed issues with language detection in admin settings

2023-01-01 - version 1.2.0
* update: Improved WooCommerce coupon handling with automatic cart application and better error handling
* update: Added protection to prevent password managers (1Password, LastPass) from auto-filling the API Key field

2022-12-01 - version 1.1.0
* feature: Sell prepaid balance top-ups directly through WooCommerce products
* feature: Automatically reverse prepaid top-ups for specific order statuses (e.g., 'refunded', 'cancelled')
* feature: Supports 'WPC Name Your Price for WooCommerce' for selling variable prepaid amounts

2022-11-01 - version 1.0.0
* feature: Accept physical and digital Giftcards in your store

2022-10-01 - version 0.9.7
* feature: Added new "Only Reward Known Contacts" setting to control credit attribution. When enabled, credits will only be awarded to contacts that already exist in Leat

2022-09-01 - version 0.9.6
* fix: Fixed an issue where custom orders statuses by guest customers would still create contacts
* feature: Added support for loyalty program tiers system

2022-08-01 - version 0.9.5
* fix: Fixed an issue where having no value in instructions would cause an error

2022-07-01 - version 0.9.4
* fix: Fixed an issue where a voucher wouldn't sync because of certain checks

2022-06-01 - version 0.9.3
* fix: Missing setting value for disable gift card recipient email field

2022-05-01 - version 0.9.2
* update: Added option to disable gift card recipient email field in checkout, allowing gift cards to be sent directly to the customer's email address

2022-04-01 - version 0.9.1
* update: Improve redirect for customers who choose "Login" or "Join program" in the dashboard

2022-03-01 - version 0.9.0
* feature: Personalized rewards display - Only shows rewards that match the contact's eligibility based on visibility filters configured in the Leat.com dashboard
* update: Improved rewards sorting - Rewards are now displayed in descending order by credit cost (high to low) for better user experience
* update: Added logs submenu to easier access debug logs

2022-02-01 - version 0.8.0
* feature: Added support for custom WooCommerce order statuses
* feature: Custom statuses must follow WooCommerce naming convention with 'wc-' prefix to be recognized
* feature: Added loyalty program support for WooCommerce blocks checkout
* feature: Automatically links orders to Leat contacts during checkout
* feature: Properly syncs customer attributes and rewards points
* feature: Maintains loyalty account tracking for both guest and registered users
* feature: Enhanced webhook management system
* feature: Added new webhook management interface in admin dashboard
* feature: Improved support for voucher creation webhooks
* feature: Improved webhook synchronization and error handling
* feature: Added automatic webhook status monitoring
* fix: Fix an issue where webhooks, rewards and promotions would always sync on settings save

2022-01-01 - version 0.7.0
* update: Added new user attributes:
* update: Syncs WordPress multisite blog memberships for users
* update: Syncs user's last order ID
* update: Webhooks automatically resync when site domain changes to maintain functionality
* update: Rewards and promotions automatically sync when API key is changed
* update: Added direct link to API key generation page in settings for easier access
* update: Improved visibility of the save button
* update: Vouchers are now automatically synced when promotion rules are published
* update: API key is now masked for users without manage_options capability, showing only last 4 characters
* update: Improved coupon code generation
* fix: Fixed displayed credit amount when `{{ credits }}` placeholder was not being used

2021-12-01 - version 0.6.3
* fix: Fixed gift card completion message showing on all orders instead of only orders containing gift cards
* fix: Fixed reward images not syncing properly for newer rewards
* update: When a coupon is removed from the cart for a free product, the free product will also be removed for WC Store API requests
* update: After claiming a reward, the dashboard now scrolls up to the coupon section
* feature: Added new setting to control visibility of the "Join Program" CTA on the dashboard
* update: Added automatic detection of WooCommerce registration settings to hide join CTA when registration is disabled
* feature: Added new [leat_reward_points] shortcode for displaying customer points anywhere on your site

2021-11-01 - version 0.6.2
* fix: fixed an issue where it was not possible to claim spend rule under certain conditions

2021-10-01 - version 0.6.1
* fix: fixed an issue where URL parameters in script tags could cause conflicts with caching plugins by stripping parameters before comparison
* update: Added span element with class 'leat-credits' around credits text in customer dashboard for improved styling control
* fix: Improved coupon visibility logic to prevent coupons from being displayed to customers under certain unintended conditions

2021-09-01 - version 0.6.0
* feature: Added automatic voucher sync between Leat and WooCommerce
* feature: Vouchers created in Leat are automatically synced as WooCommerce coupons
* feature: Real-time sync when vouchers are redeemed, updated, or deleted
* feature: Maintains contact-specific restrictions and custom attributes
* feature: Handles expiration dates and usage limits
* feature: Note: Activation date is not yet supported, only expiration date
