=== Hamidreza Order Notifier ===
Contributors: mrhamidreza
Tags: woocommerce, telegram, bale, notification, order
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Send WooCommerce order notifications to Telegram or Bale.

== Description ==

Hamidreza Order Notifier sends WooCommerce order status notifications directly to your Telegram or Bale bot chat.

Features:
- Send notifications for selected WooCommerce order statuses
- Support for Telegram and Bale
- Settings page under WooCommerce admin menu
- Optional API error logging (when WP_DEBUG is enabled)
- Translation-ready
- Requires WooCommerce as a hard dependency

== External services ==

This plugin connects to third-party messaging APIs to deliver WooCommerce order notifications to a chat configured by the site administrator.

= Telegram Bot API =

When Telegram is selected in the plugin settings, the plugin sends an HTTP POST request to the Telegram Bot API (`https://api.telegram.org/bot`) each time a WooCommerce order reaches one of the enabled order statuses.

The request includes the bot token and chat ID configured in the plugin settings, along with a notification message containing order details such as order ID, status, customer name, phone number, order total, date, and purchased items.

This service is provided by Telegram: [Terms of Service](https://telegram.org/tos), [Privacy Policy](https://telegram.org/privacy).

= Bale Bot API =

When Bale is selected in the plugin settings, the plugin sends an HTTP POST request to the Bale Bot API (`https://tapi.bale.ai/bot`) each time a WooCommerce order reaches one of the enabled order statuses.

The request includes the bot token and chat ID configured in the plugin settings, along with a notification message containing order details such as order ID, status, customer name, phone number, order total, date, and purchased items.

This service is provided by Bale: [Terms of Service](https://bale.ai/terms), [Privacy Policy](https://bale.ai/terms#s9).

== Installation ==

1. Upload the plugin folder to the `/wp-content/plugins/` directory, or install through the WordPress admin Plugins screen.
2. Make sure WooCommerce is installed and active.
3. Activate the plugin through the "Plugins" menu in WordPress.
4. Go to `WooCommerce > Order Notifier`.
5. Enter your bot token and chat ID.
6. Enable notifications and choose the order statuses you want.
7. Click "Save Settings".

== Frequently Asked Questions ==

= Does this plugin require WooCommerce? =

Yes. WooCommerce must be installed and active. The plugin will not activate without WooCommerce.

= Where is the settings page? =

The settings page is available under **WooCommerce > Order Notifier** in your WordPress admin dashboard.

= Does it support Bale? =

Yes. You can choose Telegram or Bale from the plugin settings.

= Where do I find my Telegram bot token? =

Create a bot using @BotFather in Telegram. BotFather will give you an authentication token.

== Screenshots ==

1. Plugin settings page under WooCommerce menu
2. Example order notification message

== Changelog ==

= 1.1.0 =
* Refactored codebase into modular class-based architecture
* Settings page moved to WooCommerce submenu (WooCommerce > Order Notifier)
* WooCommerce is now a hard dependency - plugin will not activate without it
* Added dedicated admin CSS for cleaner settings page
* Error logging now works when WP_DEBUG is enabled
* Updated WordPress and WooCommerce compatibility headers
* Improved code organization following WordPress coding standards

= 1.0.8 =
* Prefix plugin option and settings identifiers with hamidreza_ for WordPress.org compliance.
* Migrate stored settings from the legacy hrwcn_settings option key.

= 1.0.7 =
* Remove bundled translation files; translations are managed through translate.wordpress.org.
* Document Telegram and Bale external services in the readme.

= 1.0.6 =
* Initial release.

== Upgrade Notice ==

= 1.1.0 =
Major refactor - settings page is now under WooCommerce > Order Notifier. WooCommerce is required for activation. All existing settings are preserved.
