=== Send SMS Today ===
Contributors: codecasastudios
Tags: woocommerce, sms, order notifications, two factor authentication, password reset
Requires at least: 5.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

WooCommerce SMS in minutes with 2FA, shortlinks, password reset SMS, order updates, logs, and subscriptions built in.

== Description ==

Send SMS Today adds professional, affordable SMS services to over 100 countries including the US, Canada, and United Kingdom. Send SMS in minutes: activate the plugin, choose a subscription, and choose where you would like SMS to be sent. 2FA, shortlinks, and forgot password SMS are all built in.

The plugin connects your WordPress site to the hosted Send SMS Today service so your store can send operational SMS messages, manage monthly SMS subscriptions, view message logs, and use customer account security features from inside WordPress.

Setup is designed to be simple:

* Install the plugin.
* Enter your store details.
* Verify your mobile number by SMS.
* Choose a monthly SMS subscription.
* Turn on the WooCommerce SMS messages you want to send.

= Features =

* Send SMS when WooCommerce orders move to processing, completed, on hold, cancelled, refunded, or failed.
* Send a configurable pending payment reminder when an order remains pending for 10 minutes.
* Send SMS when a customer-visible order note is added.
* Built-in customer account SMS two-factor authentication.
* Optional SMS password reset messages.
* Automatic shortlinks for supported account, order, and reset links.
* Global mobile number validation for setup and customer account security flows.
* Optional store name prefixing for outgoing SMS messages.
* Message logs with SMS status, recipient, message type, send time, and credits used.
* Monthly subscription plan selection from inside WordPress.
* Billing portal access, plan upgrades, cancellation controls, and auto top-up controls.
* Optional auto top-up: add 100 SMS credits when balance reaches 10 credits.

= External Services =

This plugin connects to external services because SMS sending, verification, subscription billing, delivery logs, and shortlinks are provided through hosted services rather than only inside your WordPress installation.

The plugin sends data to the Send SMS Today API. By default the plugin uses `https://backend-one-navy-66.vercel.app/api`. If a site owner defines `CODECASA_SMS_MARKETING_API_URL` or saves a different API URL, the plugin uses that configured URL instead.

The Send SMS Today API is used when:

* You submit the onboarding form.
* You verify your mobile number by SMS.
* You request available subscription plans.
* You start Stripe checkout from the plugin.
* You view dashboard balance, subscription, billing, and message log data.
* You save plugin SMS settings.
* The plugin sends an SMS for an order event, customer note, two-factor authentication code, password reset message, verification code, manual message, or other enabled SMS flow.
* You open billing details, change plan, cancel subscription, or update auto top-up settings.

Depending on the action, the plugin may send:

* Site URL and store name.
* Administrator email address.
* Verification mobile number.
* Authentication token issued by Send SMS Today after verification.
* WooCommerce order ID, order status, customer name, billing phone number, account URL, site URL, customer note text, and generated message content.
* WordPress user ID where needed for account security messages.
* SMS settings and message templates.
* Subscription plan ID, billing return URLs, and auto top-up preference.

Send SMS Today uses this data to provide the SMS service, verify store access, create and manage subscription billing, send messages, maintain logs, process delivery status, deduct SMS credits, and provide support.

Service terms: https://sendsmstoday.com/terms.html
Privacy policy: https://sendsmstoday.com/privacy.html

The hosted Send SMS Today service may route SMS delivery through Twilio. Twilio receives the recipient mobile number and message body only when needed to deliver an SMS.

Twilio terms: https://www.twilio.com/en-us/legal/tos
Twilio privacy notice: https://www.twilio.com/en-us/legal/privacy

Payments and billing are handled by Stripe. When you choose a subscription, manage billing, upgrade, cancel, or use auto top-up, billing-related data is processed by Stripe.

Stripe privacy policy: https://stripe.com/us/privacy
Stripe services agreement: https://stripe.com/legal/ssa
Stripe Privacy Center: https://stripe.com/en-gb-us/legal/privacy-center

Shortlinks are created through the Send SMS Today shortlink service at `https://shrt.codes/api/shorten` when a supported SMS message contains a URL. The original URL is sent to the shortlink service so a short URL can be created for use in the SMS.

Shortlink service: https://shrt.codes
Shortlink terms: https://sendsmstoday.com/terms.html
Shortlink privacy policy: https://sendsmstoday.com/privacy.html

== Installation ==

1. Upload the plugin ZIP through Plugins > Add New > Upload Plugin.
2. Activate the plugin.
3. Open WooCommerce > SMS Marketing in WordPress admin.
4. Complete the setup wizard.
5. Verify your mobile number using the SMS code.
6. Select a monthly SMS subscription.
7. Configure your SMS triggers and message templates.

== Frequently Asked Questions ==

= Do I need API keys? =

No. The plugin uses the Send SMS Today setup wizard and account verification flow. You do not need to paste API keys into WordPress.

= Does this work with WooCommerce? =

Yes. The plugin is built for WooCommerce order status messages, customer notes, billing phone collection, and My Account security flows.

= Can customers receive two-factor authentication codes by SMS? =

Yes. Customer account SMS two-factor authentication can be turned on from the plugin settings.

= Can customers receive password reset links by SMS? =

Yes. Password reset SMS messages can be enabled from the plugin settings.

= Are shortlinks included? =

Yes. Supported URLs in SMS messages can be shortened automatically.

= What happens when the SMS balance gets low? =

Auto top-up is on by default for active subscriptions. When enabled, if the SMS balance reaches 10 credits or fewer, the service can charge the saved subscription payment method for a 100 SMS credit top-up. You can turn auto top-up off or on from the plugin dashboard.

= Can I manage billing inside WordPress? =

Yes. The dashboard includes subscription status, billing details, upgrades, cancellation controls, and auto top-up settings.

= What phone numbers are supported? =

UK numbers can start with `07` or `+447`. International numbers must include the country code in E.164 format, for example `+15551234567`.

== Screenshots ==

1. Setup wizard for store verification and subscription selection.
2. SMS dashboard showing balance, plan, subscription, and recent messages.
3. SMS settings for WooCommerce order triggers, account security, and password reset messages.
4. Message logs with delivery status and credits used.

== Changelog ==

= 1.0.4 =
* Moved plugin admin pages under WooCommerce or Settings instead of a high-position top-level menu.
* Updated the text domain to match the WordPress.org plugin slug.
* Renamed public plugin prefixes for actions, options, constants, script handles, and namespaces.
* Added failed order and delayed pending payment SMS notifications.

= 1.0.1 =
* Added WooCommerce compatibility declarations.
* Added subscription management, billing portal, upgrades, cancellation, and auto top-up controls.
* Added SMS logs, delivery status handling, and delivery-based credit deduction.
* Added customer account SMS two-factor authentication.
* Added optional SMS password reset messages.
* Added automatic shortlinks for supported URLs.
* Added global mobile number validation and resend code controls.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.4 =
Addresses WordPress.org review feedback and adds failed order and pending payment SMS options.

= 1.0.1 =
Adds subscription management, delivery-aware logs, customer account security features, and auto top-up controls.
