=== MekanBook Loyalty for WooCommerce ===
Contributors: mekanbook
Tags: loyalty, points, rewards, woocommerce, cashback
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Customers earn and redeem their MekanBook venue loyalty points in your WooCommerce store.

== Description ==

If your café, restaurant or roastery runs a MekanBook loyalty programme, this plugin lets the same card work online:

* "Use MekanBook points" box on checkout (points, cashback or a full stamp-card reward).
* Customers link their MekanBook account with a one-time code e-mailed to them — no silent matching. Your store never receives their MekanBook e-mail or phone, only an anonymous customer reference.
* Points are awarded when the order is completed (or paid — configurable) and reversed proportionally on refunds; cancelled orders return used points.
* Signed webhook: when a customer unlinks the store in their MekanBook account, the link is removed here too.
* Translations: English, Turkish.

The plugin needs the "E-commerce loyalty" feature in the venue's MekanBook plan and an active loyalty programme.

== Installation ==

1. MekanBook Panel › Marketing › Online store: add your store (platform: WooCommerce) and copy the API key shown once.
2. Upload this zip under Plugins › Add New › Upload and activate it.
3. WooCommerce › Settings › MekanBook: paste the API key, save, click "Test connection".
4. Optional: copy the webhook URL shown on that page into the MekanBook panel and paste the generated secret back here.

== Frequently Asked Questions ==

= How is the discount applied? =
As a negative fee calculated by MekanBook from your rules (maximum % of basket, minimum order). The points are reserved when the order is created (held for 30 minutes) and confirmed when the order is paid.

= What amount earns points? =
Order total after discounts, excluding shipping, multiplied by the earn rate you set in the panel.

== Changelog ==

= 1.0.0 =
* First release.
