=== VW Order Notify for Telegram ===
Contributors: vendweave, webexpertrabbi
Donate link: https://vendweave.com/
Tags: woocommerce, telegram, notifications, orders, alerts
Requires at least: 5.0
Tested up to: 7.0
Requires PHP: 7.2
Requires Plugins: woocommerce
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Sends real-time WooCommerce order notifications to a Telegram channel/group with order details.

== Description ==

VW Order Notify for Telegram connects WooCommerce with Telegram so store owners can receive instant order alerts in a Telegram channel or group.

The plugin is simple to configure: add your Telegram Bot Token and Chat ID, choose trigger events, customize your message template, and start receiving notifications.

= Key Features =

* Real-time order notifications for WooCommerce.
* Flexible message template with many placeholders.
* Test message button to verify setup quickly.
* Trigger control for new orders and status changes.
* Optional Slack webhook notifications.
* Optional customer email copy.
* Clean, responsive admin settings interface.

= Placeholder Tags =

You can use the following placeholders inside the message template:

* `{order_id}`
* `{order_status}`
* `{order_date}`
* `{order_link}`
* `{customer_name}`
* `{customer_email}`
* `{phone}`
* `{customer_note}`
* `{billing_address}`
* `{shipping_address}`
* `{product_list}`
* `{item_count}`
* `{currency}`
* `{subtotal}`
* `{shipping_cost}`
* `{discount}`
* `{total}`
* `{payment_method}`
* `{device}`
* `{browser}`
* `{os}`
* `{customer_ip}`

= External Services =

This plugin connects to third-party services to deliver notifications:

1. Telegram Bot API (required)
	* Service endpoint: https://api.telegram.org/
	* Data sent: configured chat ID, notification message text (may include order and customer details based on your template), optional product image URL
	* Purpose: send WooCommerce order notifications to Telegram
	* Service terms: https://telegram.org/tos
	* Privacy policy: https://telegram.org/privacy

2. Slack Incoming Webhook (optional)
	* Data sent: notification message text when Slack channel is enabled
	* Purpose: send order notifications to Slack
	* Service terms: https://slack.com/terms-of-service
	* Privacy policy: https://slack.com/privacy-policy

Site owners are responsible for informing users and updating their privacy policy where required.

== Installation ==

1. Upload the `vw-order-notify-for-telegram` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin from WordPress admin > Plugins.
3. Ensure WooCommerce is installed and active.
4. Go to VW Order Notify in the admin menu.

= Configuration =

1. Create a Telegram bot via [@BotFather](https://t.me/BotFather).
2. Copy the Bot Token.
3. Create a Telegram channel/group and add the bot as admin.
4. Collect the Chat ID.
5. Paste Bot Token and Chat ID in plugin settings.
6. Configure triggers and message template.
7. Click Send Test Message.
8. Save settings.

== Frequently Asked Questions ==

= How do I create a Telegram Bot? =

Open Telegram, find [@BotFather](https://t.me/BotFather), run `/newbot`, and follow the steps. BotFather will provide your bot token.

= How do I get my Telegram Chat ID? =

Add the bot to your group/channel as admin and retrieve the chat ID using your preferred Telegram ID tool. Channel IDs usually start with `-100`.

= Can I customize the notification message? =

Yes. The template editor supports placeholders and Telegram-friendly formatting.

= Does this work with all payment gateways? =

Yes. The plugin uses WooCommerce order hooks, so it works with standard gateways.

= What triggers the notifications? =

You can enable notifications for new orders and for order status changes.

= Does this plugin collect personal data? =

The plugin itself does not store extra customer data beyond WooCommerce order data. If your template contains personal details (for example phone/email/address/IP), those details will be sent to Telegram (and optionally Slack/email) as part of notification delivery.

== Screenshots ==

1. Main settings page.
2. Telegram API settings and test message button.
3. Notification triggers.
4. Message template editor and placeholders.

== Changelog ==

= 1.0.0 =
* Initial release
* Real-time order notifications
* Customizable message templates
* Test message functionality
* Mobile responsive admin interface

== Upgrade Notice ==

= 1.0.0 =
Initial release of VW Order Notify for Telegram.
