=== Bulk SMS India – SMS & WhatsApp for WooCommerce & WordPress ===
Contributors: bulksmsindia
Tags: sms, whatsapp, woocommerce sms, otp, bulk sms
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Real-time order SMS and WhatsApp messages, OTP verification and form alerts for WooCommerce and WordPress. DLT-ready with live delivery reports.

== Description ==

Bulk SMS India connects your WooCommerce store and WordPress site to the Bulk SMS India platform, so every order update, OTP and enquiry reaches your customer's phone in real time.

**WooCommerce order SMS**

* Automatic SMS when an order is pending, processing, on hold, completed, cancelled, refunded or failed
* New-order SMS alert to you or your team
* Send a one-off SMS to the customer from the order screen
* Variables such as {first_name}, {order_id}, {order_total}, {tracking_number}
* Compatible with WooCommerce High-Performance Order Storage (HPOS)

**WhatsApp messages (new in 1.1)**

* Choose the channel for every message: SMS, WhatsApp, both, or WhatsApp with automatic SMS fallback
* Separate WhatsApp text for order updates (no DLT template needed for the WhatsApp copy)
* Attach the first product image to order messages, or up to 4 image URLs from the Send page
* Test send screen shows the raw API response
* WhatsApp messages appear in the same log with a WhatsApp badge

**OTP verification**

* Verify the billing phone at checkout before an order is placed (classic checkout)
* `[bsi_otp_verify]` shortcode for any page
* Hashed OTPs, expiry, resend timer, rate limits per number and per IP

**Form alerts**

* Contact Form 7, WPForms and Elementor Pro Forms
* SMS alert to you and instant acknowledgement to the visitor

**Built for India**

* DLT-ready: per-message DLT template ID field and your approved sender ID
* Promotional SMS outside 10 AM – 9 PM IST are automatically scheduled for the next morning
* Live character and SMS-part counter, including Hindi and Unicode
* SMS log with delivery status checked a minute after sending and every 5 minutes
* Send or schedule SMS to numbers or to contact groups saved in your Bulk SMS India panel

== Installation ==

1. Upload the plugin and activate it.
2. Go to **Bulk SMS India → API settings** and enter your username, API key and DLT-approved sender ID.
3. Click **Check connection and balance**.
4. Turn on the order, OTP or form messages you need. Use text that exactly matches your DLT-approved templates.
5. Optional: go to **Bulk SMS India → WhatsApp**, enter your WhatsApp API key, save, send a test message, then pick WhatsApp as the channel where you want it.

== Frequently Asked Questions ==

= Do I need a Bulk SMS India account? =
Yes. Create an account at bulksmsind.in to get your username and API key.

= Do messages need DLT approval? =
Yes. In India every business SMS must match a template registered on a DLT portal. Paste the approved text into each message box and replace each {#var#} with a variable.

= Does OTP work with the block-based checkout? =
Checkout OTP currently supports the classic checkout shortcode. You can use the `[bsi_otp_verify]` shortcode elsewhere.

= Do WhatsApp messages have delivery reports? =
WhatsApp messages are logged as "submitted" with the API response. Delivery reports for WhatsApp will be added when the API exposes them.

= What if WhatsApp is not set up or a WhatsApp send fails? =
If WhatsApp is turned off or has no API key, messages go by SMS. With "WhatsApp, SMS if it fails", an SMS is sent automatically when the WhatsApp API returns an error.

== External services ==

This plugin sends SMS through the Bulk SMS India API at sms.bulksmsind.in. The recipient number, the message text, your sender ID and your account credentials are sent to the API when an SMS is sent, and message IDs are sent when delivery reports are checked. When WhatsApp is turned on, the recipient number, message text, image URLs and your WhatsApp API key are sent to the WhatsApp API endpoint set on the WhatsApp tab (default web.cloudwhatsapp.com). Terms: https://bulksmsind.in/ Privacy: https://bulksmsind.in/

== Changelog ==

= 1.1.0 =
* New: WhatsApp channel for order updates, new-order alerts, OTP, form alerts and manual sends.
* New: channel per message (SMS, WhatsApp, both, WhatsApp with SMS fallback).
* New: product image on WhatsApp order messages.
* Log shows the channel of each message.
* Fix: variable list on the WooCommerce tab.
* Fix: the 5-minute delivery-report check is now always scheduled (it could be skipped on activation); existing sites repair it automatically.
* Fix: numbers separated by new lines or semicolons are accepted everywhere, and duplicate numbers are removed.
* Tested end to end with WordPress 6.6, WooCommerce 9.3 (classic and HPOS-ready) and Contact Form 7 6.0.

= 1.0.0 =
* First release.
