=== Leat ===
Contributors: leat
Donate link: https://leat.com
Tags: loyalty program, rewards, loyalty, vouchers, marketing automation
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 5.0.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Create and manage customer loyalty programs with points, rewards, and automated marketing - works both online and in-store.

== Description ==

Enhance your customer experience with Leat.

[youtube https://www.youtube.com/watch?v=3udRTILYGuE]

Leat's all-in-one platform empowers you to:

* Quickly set up a fully customized loyalty program and rewards, with no coding required
* Effortlessly engage customers using targeted vouchers and promotions
* Drive growth with real-time analytics and insights
* Seamlessly manage your loyalty program both online and offline

= Key Features =

* **Points & Rewards Program** - Create a flexible points system where customers earn points for purchases
* **Custom Rewards** - Design attractive rewards that keep customers coming back
* **Automated Marketing** - Send targeted emails and notifications based on customer behavior
* **Real-time Analytics** - Track program performance and customer engagement
* **WooCommerce Integration** - Seamlessly works with your existing store
* **Multi-channel Support** - Works both online and in physical stores
* **Compatibility with WPC Name Your Price:** Works seamlessly with the WPC Name Your Price for WooCommerce plugin, allowing customers to set their own price for prepaid top-ups and gift card products.

= External Services =

This plugin requires an API connection to [Leat](https://www.leat.com) and its business portal ([business.leat.eu](https://business.leat.com)) for core functionality including reward management, customer tracking, and loyalty point calculations.

**Data transmitted includes**:
- Customer information (email, name, order history, purchase categories)
- WooCommerce order data (order totals, products purchased, dates)
- Store configuration data
- Reward and voucher definitions
- Store performance metrics and analytics

All data is transmitted securely via HTTPS to Leat's servers in compliance with GDPR and other applicable privacy regulations. Data processing occurs on both leat.com and business.leat.eu domains.

Users of this plugin should ensure they comply with the terms and privacy policies of Leat before using this plugin:

- [Terms of Service](https://www.leat.com/legal/terms-and-conditions)
- [Privacy Policy](https://www.leat.com/legal/privacy-policy)

== Screenshots ==

1. The plugin settings dashboard

== Installation ==

1. Upload `leat-crm-X.Y.Z.zip` to the `/wp-content/plugins/` directory
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Add your API key in the plugin settings.
4. Sync your rewards and vouchers with Leat to get started.
5. Build your loyalty pages with the Leat blocks in the WordPress block editor.
6. Add the loyalty blocks to any page or post to show points, rewards, and more.

== Frequently Asked Questions ==

= How do I get an API key? =

Sign up for a Leat account at [business.leat.eu](https://business.leat.com). Once logged in, navigate to Settings > API Integration to find your API key.

= Can I customize the loyalty dashboard appearance? =

Yes! The dashboard can be customized using CSS.

= Does this work with my existing WooCommerce store? =

Yes, Leat integrates seamlessly with WooCommerce.

= How are points calculated? =

By default, customers earn 1 point per currency unit spent (e.g., 1 point per $1). This can be customized in your Leat business portal, where you can also set up multipliers for specific products or categories.

= Is this GDPR compliant? =

Yes, Leat is fully GDPR compliant. We process all data in accordance with EU privacy regulations and provide the necessary tools for handling data subject requests. See our [Privacy Policy](https://www.leat.com/legal/privacy-policy) for more details.

= What happens if I uninstall the plugin? =

Your customer data and loyalty program settings are safely stored in your Leat account. If you reinstall the plugin later, you can simply reconnect using your API key and all data will be restored.

= How do I display loyalty content on my site? =

Use the Leat blocks in the WordPress block editor. Add them to any page or post to show the loyalty dashboard, a customer's point balance, rewards, and more — no shortcodes required.

The legacy [leat_dashboard], [leat_reward_points] and [leat_referral] shortcodes were removed in 5.0.0. If you used them, rebuild those areas with the Leat blocks on a page (preferred), or use a Content Block. See the migration guide: https://leat-docs.vercel.app/wordpress-plugin/migrating-from-shortcodes

= General Upgrade Guidelines =

Before major updates (x.0.0):

1. Backup site and database
2. Test on staging environment
3. Test purchase flow, points, vouchers, gift cards
4. Verify loyalty data intact

== Changelog ==

= 5.0.0 =

* WordPress 6.6 or newer is now required.
* Loyalty pages now use Leat blocks or Content Blocks; the legacy loyalty shortcodes have been removed. Sites upgrading from an older version see a one-time migration notice with next steps.
* Birthday fields can be used during registration, checkout, account editing, and loyalty enrollment, with a new one-time birthday reward option.
* Free / Discounted Product rewards now support product choice and apply the reward to the selected item only.
* Spend Rules make product selection clearer and stay updated when rewards change, even after temporary connection issues.
* Gift cards now process more reliably through checkout and order completion, use the buyer's email when no recipient is provided, and explain when follow-up is needed.
* Loyalty data and rewards now load more reliably for signed-in customers, while unrelated orders avoid unnecessary loyalty or gift-card processing.

= 4.6.0 =

* You can now retry syncing an individual order to Leat from its order details.
* You can now select multiple orders and sync them to Leat in one action.
* The plugin now clearly flags incomplete setup and waits to sync until it is complete.
* Retried order syncs now award points correctly when the order qualifies.
* Gift cards are now consistently cancelled whenever an order is refunded — including when the order is set to Refunded directly or refunded by total amount, in addition to the existing per-line-item refunds.
* When a single line holds several gift cards, refunding them one at a time now cancels a different card each time, so every refunded card is correctly voided.
* Gift card refunds now keep card balances accurate when a refund is retried.
* Rewards that are turned off now correctly appear unavailable.
== Upgrade Notice ==

= 5.0.0 =

The legacy [leat_dashboard], [leat_reward_points] and [leat_referral] shortcodes are removed. Before upgrading, rebuild those areas with the Leat Gutenberg blocks on a page (preferred), or use a Content Block: https://leat-docs.vercel.app/wordpress-plugin/migrating-from-shortcodes
