RefatBd notifications with Telegram for Woocommerce

Beskrivelse

RefatBd notifications with Telegram for Woocommerce is a powerful and flexible tool for WooCommerce store owners who want to receive real-time updates via Telegram.
It integrates seamlessly with a secure, private API, ensuring your store’s communication is both instant and safe.

This plugin allows you to send automated, template-based notifications for a wide range of events, including order status changes, new user registrations, product stock updates, abandoned checkouts, new product reviews, and more, directly to your chosen Telegram chat.

🚀 NEW: Customer Notifications System!
Expand your store’s capability by allowing your customers to receive real-time updates about their orders.
* Seamless Connection: Customers can connect their Telegram account via a secure “Connect” button on the “Thank You” page or “My Account” dashboard.
* Guest Support: Unique logic identifies guest users by their Email or Phone number, ensuring they receive updates for future orders even without a WordPress account.
* Secure Handshake: Uses a deep-link token system to securely link Telegram users to your store without manual ID entry.

Key Features:

  • WooCommerce HPOS Compatible: Fully supports WooCommerce High-Performance Order Storage (HPOS).
  • Secure API Integration: Connects to a private Telegram API Backend (https://tgapi.refat.ovh/api.php), keeping your sensitive Bot Token secure and off your server.
  • Admin Notifications: Get alerts for order status changes, new user registrations (including admins), stock changes, low/out of stock alerts, abandoned checkouts, new product reviews, coupon usage, failed login attempts, and product price changes.
  • Customer Notifications: Send automated order status updates directly to your customers’ Telegram accounts. Supports both registered users and guests.
  • Connection Management: View connected users and guests in the admin panel. Easily disconnect or block abusive users.
  • Advanced Conditional Logic: Create rules based on product IDs, categories, tags, order total, quantity, customer details, payment methods, shipping zones, coupon codes, custom fields, time of day, and stock levels.
  • Single Chat ID Support (Admin): Send admin notifications reliably to one configured Telegram chat. (Upgrade to Pro for multiple chat support).
  • Customizable Message Templates: Use a wide array of placeholders to craft detailed and informative messages for every event.
  • PPOM Integration: Automatically includes data from PPOM fields in your order notifications if the PPOM plugin is active.
  • User-Friendly Admin Panel: A clean, modern, tabbed interface to manage all settings with ease.
  • History & Logging: Keep a complete record of all sent messages and utilize detailed logs for troubleshooting.
  • Scheduled Messages: Schedule custom messages to be sent to your Telegram chat at a future date and time.
  • Telegram Commands: Interact with your store directly from Telegram (e.g., /sales, /order <id>, /stock <id|sku|low|out>).

How to Use

  1. Connect Your Website:
    • In your WordPress admin, go to Telegram Sync -> API Connection.
    • The default API URL (https://tgapi.refat.ovh/api.php) is provided. Ensure this is correct.
    • Click the “Fetch API Key” button. This securely connects your site to the backend and saves your API key.
    • Verify that the API Status and Site Connection show as “Connected”.
  2. Configure Admin Chat ID:
    • Go to Telegram Sync -> Settings -> Chat Management.
    • Find the active bot’s username on the API Connection page. Send the command /myid to that bot in Telegram.
    • Enter the numeric Chat ID you received into the fields on the Chat Management tab and click “Save Changes”.
  3. Configure Notifications:
    • Go through the tabs under Telegram Sync -> Settings (General, Order Status, Customer Notifications, etc.).
    • Admin: Use the toggle switches to enable the notifications you want to receive yourself.
    • Customer: Go to the “Customer Notifications” tab and enable “Enable Customer Notifications”. Customize the templates customers will receive.
  4. Set Up Notification Rules (Optional):
    • Navigate to the Notification Rules tab to create advanced conditions for any enabled notification event.
  5. Enable the Plugin:
    • Ensure the “Enable Plugin” toggle is switched on in the General tab.

Available Placeholders:

  • For Order Status Notifications: {site_title}, {customer_name}, {order_id}, {order_status}, {product_list}, {total_price}, {total_price_formatted}, {billing_address}, {shipping_address}, {ppom_data}, {payment_method}, {shipping_method}, {customer_note}, {date_created}, {date_paid}, {date_completed}, {billing_email}, {billing_phone}.
  • For New User Notifications: {site_title}, {user_login}, {user_email}.
  • For New Admin User Notifications: {site_title}, {user_login}, {user_email}, {user_roles}.
  • For Stock Notifications: {site_title}, {product_name}, {product_sku}, {stock_status}.
  • For Low/Out of Stock Alerts: {site_title}, {product_name}, {product_sku}, {stock_status}, {stock_quantity}, {alert_type}.
  • For Abandoned Cart: {customer_name}, {customer_email}, {customer_phone}, {date_created}, {product_list}, {variation_data}, {ppom_data}.
  • For New Product Reviews: {site_title}, {product_name}, {product_link}, {reviewer_name}, {reviewer_email}, {review_content}, {review_rating}, {review_link}.
  • For Coupon Usage: {site_title}, {order_id}, {customer_name}, {total_price_formatted}, {coupon_codes}, {coupon_count}.
  • For Failed Login Attempts: {site_title}, {username}, {ip_address}, {failed_attempts}, {threshold}.
  • For Product Price Changes: {site_title}, {product_name}, {product_sku}, {old_price}, {new_price}, {price_change_text}, {percentage_change}, {product_link}.

External Services

This plugin relies on a mandatory third-party API service hosted at https://tgapi.refat.ovh/api.php to function.
* What the service is and what it is used for: The service acts as a secure intermediary between your WooCommerce store and the Telegram messaging service. It allows your site to send notifications without exposing your sensitive Telegram Bot Token. It also handles the secure “handshake” for connecting customers to your store via Telegram.
* What data is sent:
* Connection: Your domain and a site secret are sent to register the site.
* Notifications: Message content (which may include order/customer details based on your templates) and the recipient’s Chat ID.
* Customer Linking: When a customer connects, a temporary token is generated and validated against the API to securely exchange their Chat ID.
* Service’s Terms of Use and Privacy Policy:
* Terms of Use
* Privacy Policy

Skærmbilleder

Installation

  1. Upload the refatbd-notifications-with-telegram-for-woocommerce folder to your /wp-content/plugins/ directory.
  2. Activate the plugin through the ‘Plugins’ menu in your WordPress dashboard.
  3. Navigate to the Telegram Sync menu in your WordPress dashboard to begin configuration.

FAQ

Does this work for Guest users?

Yes! Version 2.1.0 introduces Guest support. If a guest clicks “Connect Telegram” on the Thank You page, we link their Chat ID to their billing email and phone number. Future orders with those details will automatically trigger notifications.

Can customers disconnect?

Yes. If a customer is connected, the button on their “My Account” or “Thank You” page changes to “Disconnect”. They can click this to stop receiving notifications. Admins can also disconnect users from the backend.

Why am I not receiving notifications?

  1. Check API Connection: Ensure “API Status” is Connected.
  2. Check Chat ID: Send /myid to the bot and verify the ID in settings.
  3. Bot Started: Ensure you (or the customer) have pressed “Start” on the bot.
  4. Logs: Check the Telegram Sync -> Logs tab for “Limit Reached” or other errors.

Anmeldelser

Der er ingen anmeldelser for denne widget.

Bidragsydere & udviklere

“RefatBd notifications with Telegram for Woocommerce” er open source-software. Følgende personer har bidraget til dette plugin.

Bidragsydere

Ændringslog

2.1.0

  • FEATURE: Added Customer Notifications system for real-time order updates.
  • FEATURE: Added support for Guest users (tracking via Email/Phone).
  • FEATURE: Added “Connect Telegram” button to Thank You and My Account pages.
  • FEATURE: Added Connection Management page (View, Disconnect, Block users).
  • FEATURE: Added secure “Deep Link” handshake for connecting Telegram users.
  • UPDATE: Database schema updates for guest and blocked user management.
  • FIX: Improved API Handler structure and reliability.
  • FIX: Partial batch send now correctly fires rntfw_telegram_message_sent with only successfully queued IDs.

2.0.2

  • SECURITY: Hardened database queries in RNTFW_DB class.
  • FIX: Resolved “Unescaped parameter” warnings.

2.0.1

  • COMPATIBILITY: Tested up to WordPress 6.9.
  • FIX: Resolved fatal error “Class RNTFW_Admin not found” on frontend.

2.0.0

  • MAJOR: Restructured plugin to comply with WordPress.org guidelines.
  • UPDATED: Readme “External Services” section.