=== WPMAT - Telegram Miniapp ===
Contributors: aiseoua
Donate link: https://wpmat.me/
Tags: telegram, mini-app, woocommerce, notifications, bot
Requires at least: 5.8
Tested up to: 6.9.4
Requires PHP: 7.4
Stable tag: 2.3.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Turn your WordPress site into a Telegram Mini App with automatic user authentication and WooCommerce order notifications.

== Description ==

**WPMAT** (WordPress Mini Apps Telegram) turns your website into a fully functional Telegram Mini App. Powered by [Questflow](https://questflow.pro/), the plugin provides seamless Telegram user authentication and real-time WooCommerce order notifications — all with minimal configuration.

= Key Features =

* 🔐 **Automatic Telegram Authentication** — Users opening your site via Telegram Mini App are automatically logged in to WordPress
* 🛒 **WooCommerce Notifications** — Send order status updates directly to customers via Telegram bot
* 🌐 **Mini App Integration** — Your WordPress site works as a native Telegram Mini App
* ⚡ **Easy Setup** — Just one Site ID to connect everything
* 🎨 **Customizable Templates** — Configure notification messages per order status with template variables
* 🌍 **Multilingual** — Admin interface available in 19 languages: English, Ukrainian, Russian, Arabic, Azerbaijani, Bengali, French, German, Greek, Hindi, Indonesian, Italian, Japanese, Korean, Polish, Portuguese, Spanish, Turkish, Uzbek

= How It Works =

1. Sign up at [Questflow.pro](https://questflow.pro/) and create a bot
2. Go to Admin → Settings → Site Integration → Generate Site ID
3. Install and activate this plugin on your WordPress site
4. Enter the Site ID in the WMAT Lite settings page
5. Your site is now a Telegram Mini App!

= WooCommerce Integration =

If WooCommerce is installed, customers authenticated via Telegram will automatically receive order notifications in the bot. Choose which order statuses to track and customize message templates with 10 variables: `{order_id}`, `{status_label}`, `{total}`, `{currency}`, `{items}`, `{shop_name}`, `{customer_name}`, `{shipping_address}`, `{billing_address}`, `{payment_method}`.

= Links =

* [Questflow Platform](https://questflow.pro/) — Bot builder and automation platform
* [WMAT Website](https://wpmat.me/) — Additional plugins and services
* [Support](https://t.me/GuruAppSheet) — Telegram support channel

== Installation ==

1. Upload the `wpmat` folder to the `/wp-content/plugins/` directory
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Go to the WPMAT menu in Admin panel
4. Enter your Site ID (obtained from [Questflow.pro](https://questflow.pro/))
5. Click "Save & Check Connection"

== Frequently Asked Questions ==

= Where do I get a Site ID? =

Sign up at [Questflow.pro](https://questflow.pro/), create a Telegram bot, and navigate to Settings → Site Integration to generate your Site ID.

= Does this plugin require WooCommerce? =

No. WooCommerce is optional. Without it, the plugin still provides Telegram Mini App authentication. WooCommerce notifications are an additional feature that activates automatically when WooCommerce is detected.

= Is the plugin free? =

Yes, WPMAT is completely free. For additional features and premium support, visit [wpmat.me](https://wpmat.me/).

= What data does the plugin send externally? =

The plugin communicates with the Questflow API (`questflow.pro`) to verify Telegram user identity and send order notifications. No personal data is stored on external servers beyond what is necessary for authentication.

== Screenshots ==

1. Settings page — Connection to Questflow
2. Status panel — Connection and WooCommerce status
3. WooCommerce notifications — Template configuration

== Changelog ==

= 2.3.4 (2026-05-14) =
* Added shipping address, billing address, and payment method to notification templates
* New template variables: `{shipping_address}`, `{billing_address}`, `{payment_method}`
* Updated default notification template with delivery and payment info
* Total of 10 template variables now available

= 2.3.3 (2026-05-14) =
* Fixed critical activation error: "Constant WPMAT_VERSION already defined"
* Fixed false "Connection active" status when Site ID is empty
* Improved constant definition guards for multi-plugin compatibility
* WooCommerce settings accordion now expanded by default
* UI: Support and Save elements aligned in single row
* Applied Morphic Light design theme

= 2.3.1 (2025-05-14) =
* Added 17 new languages: Ukrainian, Arabic, Azerbaijani, Bengali, French, German, Greek, Hindi, Indonesian, Italian, Japanese, Korean, Polish, Portuguese, Spanish, Turkish, Uzbek
* Fixed Contributors field for WordPress.org compatibility
* Updated "Tested up to" WordPress 6.9.4
* Improved locale detection for all supported languages

= 2.3.0 (2025-05-12) =
* Server-side JWT authentication via qf_auth URL parameter
* Improved Telegram WebApp SDK integration
* Better connection validation and error reporting

= 2.2.0 (2025-05-02) =
* Complete plugin overhaul and rebranding to WPMAT
* Deep integration with [Questflow.pro](https://questflow.pro/) platform
* Customizable WooCommerce notification templates per order status
* Multilingual admin interface (English / Russian)
* Improved connection validation and error reporting
* Telegram WebApp SDK integration for seamless Mini App experience
* Auto-detection and replacement of outdated API URLs

= 1.0.0 =
* Initial release
* Telegram WebApp automatic authentication
* WooCommerce order notifications
* Settings page with connection check

== Upgrade Notice ==

= 2.3.4 =
New: Shipping address, billing address, and payment method in Telegram notifications. 10 template variables.

= 2.3.3 =
Critical fix: Plugin activation error resolved. Improved multi-plugin compatibility.

= 2.3.1 =
New: 19 languages supported. Fixed WordPress.org contributor validation.

= 2.2.0 =
Major update: Complete overhaul with Questflow.pro integration, customizable templates, and multilingual support.

