=== refatbd Advanced SMS for WooCommerce === Contributors: refatbd Tags: woocommerce, sms, notifications, order sms, admin sms Requires at least: 5.6 Tested up to: 7.1 WC requires at least: 3.0 WC tested up to: 8.8 Stable tag: 2.3.2 License: GPLv3 License URI: http://www.gnu.org/licenses/gpl-3.0.html Requires Plugins: woocommerce Enhanced SMS notifications for WooCommerce orders with product rules, history, and a debug log. == Description == === refatbd Advanced SMS for WooCommerce === Contributors: refatbd Tags: woocommerce, sms, notifications, order sms, admin sms Requires at least: 5.6 Tested up to: 7.0 WC requires at least: 3.0 WC tested up to: 8.8 Stable tag: 2.3.2 License: GPLv3 License URI: http://www.gnu.org/licenses/gpl-3.0.html Requires Plugins: woocommerce Enhanced SMS notifications for WooCommerce orders with product rules, history, and a debug log. == Description == This plugin is a significantly enhanced fork of the original 'SMSQ Notifications for WooCommerce' plugin. This new version includes an SMS history, a debug log, product-specific rules, and has been updated for compatibility with modern versions of WooCommerce and WordPress. Original plugin: https://wordpress.org/plugins/smsq-notifications-for-woocommerce/ **refatbd Advanced SMS for WooCommerce** extends your store by enabling automated SMS notifications to customers and administrators for various order events. It offers a modern interface and advanced features like product-specific SMS rules, an SMS history log, and a persistent debug log. **Key Features:** * **Multi-Gateway Support:** Send SMS through SMSQ Global, a configurable Generic HTTP gateway, or Twilio. * **Phone Verification (OTP):** Require customers to verify their phone number via OTP at checkout. * **Cash on Delivery Confirmation:** Send one-tap confirm links or reply-to-confirm messages for COD orders. * **Shipment Tracking:** Per-order tracking with placeholders for Pathao, Steadfast, RedX, and Paperfly. * **Abandoned Cart Recovery:** Automatically send reminder SMS (with optional coupons) for abandoned carts. * **Global SMS Broadcast:** Send bulk SMS to all users, specific product buyers, or filtered by number type. * **Background Queue & Scheduling:** Process large broadcasts in background batches to ensure reliability. * **Delivery Reports (DLR) & Inbound Replies:** Track delivery status and handle opt-out (STOP) or COD confirmation. * **Consent & Opt-out:** Optional checkout consent checkbox and global suppression list support. * **Automated Campaigns:** Setup daily birthday messages and win-back automations with coupons. * **Low Balance Alerts:** Get notified via email or SMS when your SMS credit runs low. * **Plugin Toggle:** Easily enable or disable all SMS notifications with a single switch. * **Status-Based SMS:** Send custom SMS messages to customers when their order status changes. * **Admin Notifications:** Notify store administrators via SMS for new orders. * **Customer Note SMS:** Alert customers via SMS when a new note is added to their order. * **Product-Specific Rules:** Send or don't send SMS based on products in the order. * **Customizable Templates:** Use a wide range of placeholders to personalize SMS messages. * **On-Hold Reminders:** Automatically send reminder SMS messages for orders on-hold. * **SMS History & Export:** Keep a log of all sent SMS messages and export them to CSV. * **Debug Log:** A dedicated tab to view detailed debug information. * **International SMS Support:** Option to enable/disable international prefixes. * **Multiple Admin Phones:** Configure multiple admin phone numbers to receive notifications. * **Multiple API Credentials:** Manage and switch between multiple SMSQ API credentials seamlessly. * **API Balance Check:** View your SMS gateway account balance directly from the plugin. * **WPML Compatible:** Message templates are translatable with WPML. * **Modern Admin Interface:** Beautifully redesigned settings page with gradients, glassmorphism, and intuitive navigation. To use this plugin, you need an active account with [SMSQ Global](https://smsq.global) and SMS credits. == External services == This plugin connects to the SMSQ Global API to send SMS notifications. This is a core feature of the plugin and is essential for its functionality. * **Service:** SMSQ Global * **What it is used for:** Sending SMS messages for order status updates, customer notes, and admin notifications. * **What data is sent:** When an SMS is sent, the plugin sends the recipient's phone number, the message content, and your API credentials (API Key, Client ID, Sender ID) to the SMSQ Global API. * **Terms of Service:** [https://smsq.global/terms-and-conditions](https://smsq.global/terms-and-conditions) * **Privacy Policy:** [https://smsq.global/privacy-policy](https://smsq.global/privacy-policy) == Installation == 1. **Automatic Installation:** * In your WordPress dashboard, go to `Plugins > Add New`. * Search for "refatbd Advanced SMS for WooCommerce". * Click "Install Now" and then "Activate". 2. **Manual Installation:** * Download the plugin ZIP file. * In your WordPress dashboard, go to `Plugins > Add New` and click "Upload Plugin". * Choose the downloaded ZIP file and click "Install Now", then "Activate". 3. **Configuration:** * Navigate to `WooCommerce > refatbd Advanced SMS`. * Enter your SMSQ API Key, Client ID, and Sender ID in the "API Settings" tab. * Configure other settings and save changes. == Screenshots == 1. Admin Settings - General Tab 2. Admin Settings - Customer Messages Tab 3. Admin Settings - Admin Messages Tab 4. Admin Settings - API Settings Tab 5. Admin Settings - Product Rules Tab 6. Admin Settings - Advanced Tab 7. Admin Settings - History Tab == Changelog == = 2.3.2 (October 25, 2026) = * Fix: Resolved PHP 8.x non-numeric string arithmetic warning in `refaadsm_do_prune_logs()` by properly calculating the 30-day log cutoff using `gmdate()`. = 2.3.1 = * Performance: Routed checkout SMS triggers through asynchronous background queue jobs to ensure instant order placement without gateway latency bottlenecks. * Fix: Hardened order status tracking listener and SMS history dispatch hooks. = 2.3.0 = * NEW: Multi-gateway support - send through SMSQ Global, a configurable Generic HTTP gateway (works with most BD/global providers), or Twilio. Selectable on the API Settings tab and configured on the new Gateways tab. * NEW: Phone verification (OTP) at checkout - require customers to confirm their number with a one-time code before placing an order. * NEW: Cash on Delivery confirmation - send a one-tap confirm link (and optional reply-to-confirm) for COD orders, then auto-advance the order status. * NEW: Shipment tracking - per-order tracking number and courier box, with %tracking_number%, %tracking_url% and %courier% placeholders and auto-SMS on a chosen status. Built-in patterns for Pathao, Steadfast, RedX and Paperfly. * NEW: Abandoned cart recovery - capture checkout contact details and send a reminder SMS (with an optional unique coupon) when no order follows. * NEW: Background queue and scheduling - process large broadcasts in throttled background batches using Action Scheduler, with an optional scheduled start time. * NEW: Delivery reports (DLR) and inbound replies - REST webhooks record delivery status and handle STOP opt-out and COD reply confirmation. * NEW: Consent and opt-out - optional checkout consent checkbox and a global suppression list honored before every send. * NEW: Low balance alerts - daily check of your SMSQ credit with email and/or SMS alerts. * NEW: Birthday and win-back automations - daily messages (with optional coupons) to celebrate birthdays and re-engage lapsed customers. * NEW: Send Test SMS button on the API Settings tab. * NEW: Export SMS history to CSV, plus Provider and Delivery columns in the history table. * All new features are individually toggleable and configurable from the settings screen. = 2.2.0 = * NEW: Complete Admin UI Redesign - Modernized the entire plugin settings interface with beautiful animated gradients, glassmorphism, floating cards, and a new modern font (Outfit). * NEW: Multiple API Credentials - You can now add, edit, and manage multiple SMSQ API credentials simultaneously and seamlessly switch between them using an "Active" toggle. * NEW: Individual Balance Checks - Added the ability to check the API balance for each individual credential directly from the new credentials manager table. * NEW: Modern Toast Notifications - Replaced standard browser alerts with beautiful, color-coded toast notifications that slide in and fade out elegantly when checking your balance. * IMPROVED: Log & History Tables - Added scrollable containers for log messages and SMS history texts to prevent long messages from breaking the table layout. * IMPROVED: Pagination UI - Upgraded the pagination links in the Logs and History tabs to look like modern, interactive pills with smooth hover and active state animations. * IMPROVED: Global SMS Recipient Count - The estimated recipient count is now styled as a beautiful modern badge and perfectly vertically aligned with the action buttons. * IMPROVED: Persistent Active Balance - The global balance display at the top of the API Settings tab now intelligently displays the balance of whichever credential is currently set as "Active". = 2.1.0 = * NEW: Global SMS Broadcast feature — send bulk SMS to all users, purchasing customers, high-frequency buyers (5+ orders), buyers of a specific product, or a manually entered phone number. * NEW: Number type filter for Global SMS — choose to send to Bangladeshi numbers only, International numbers only, or both. * NEW: Recipient count preview — see how many unique numbers will receive the SMS before sending. * NEW: Product dropdown with live search (Select2) on the Global SMS Broadcast page. * NEW: Manual number input for sending a one-off SMS to any single phone number. * NEW: Character/SMS-part counter on the broadcast message field. * IMPROVED: Plugin menu moved from under WooCommerce to a dedicated top-level WordPress admin menu ("Advanced SMS") with a sub-menu for Settings and Global SMS Broadcast — easier to find for new users. * FIXED: Typo in admin JS i18n object (`i1en` → `i18n`). = 2.0.1 = * SECURITY: Hardening and security enhancements. * FIX: All issues from the WordPress plugin review team have been addressed. * NEW: Added "Requires Plugins" header for WooCommerce dependency. * NEW: Added contributor "refatbd". * FIX: Corrected text domain to match the plugin slug. * FIX: Prefixed all functions, classes, and options with "refaadsm_" to avoid conflicts. * FIX: Enqueued scripts and styles correctly, removing inline tags. * NEW: Added documentation for the external SMSQ Global service. * Maintenance release — bug fixes and compatibility improvements. = 2.0.0 = * MAJOR FORK: Plugin has been forked, renamed, and completely refactored to ensure modern compatibility and avoid conflicts. * NEW: All functions, options, and constants are now prefixed with `asw_` to prevent conflicts with other plugins. * NEW: Updated author information and links to new documentation and support pages. * MAINTENANCE: Codebase cleanup and alignment with modern WordPress coding standards. = 1.7.0 (Original Plugin Base) = * Initial features from the original SMSQ Notifications plugin up to version 1.7.0. == Upgrade Notice == = 2.0.0 = This is a major fork and rewrite of the original "Enhanced SMSQ Notifications for WooCommerce" plugin. It is not a direct upgrade. Please uninstall the old version and install this one as a new plugin. You will need to re-configure your settings.