=== Order Notifications from Your Phone - SMSMobileAPI ===
Contributors: smsmobileapi
Tags: sms, order notifications, gateway, mobile api
Requires at least: 5.2
Tested up to: 6.8
Requires PHP: 5.4
Stable Tag: 2.0.17
Version: 2.0.17
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Enhance your WooCommerce store with SMS and Gateway notifications sent directly from your own mobile number. Easy setup, real-time alerts.

== Description ==
**SMS Mobile API - Personalized SMS and Gateway Notifications for Your WooCommerce Store**

Boost your WooCommerce store’s customer communication by sending personalized updates straight from your mobile number or Gateway account. SMS Mobile API enables direct, two-way messaging, keeping your customers informed and engaged through a seamless, interactive experience.

**Key Features:**

📲 SMS and Gateway from Your Personal Account
Send notifications directly from your personal mobile number or Gateway account. Customers can reply to your messages, enabling real-time, direct communication.

📡 More Ways to Send SMS — Total Flexibility
In addition to using your mobile device, you can connect external SMS services like Twilio, MessageBird, ClickSend, and more — or even link your own SMS Gateway using a SIM modem. 
Choose the method that best fits your needs and take full control of your SMS delivery.
Use either our mobile-based SMS sending service (SMSMobileAPI) or connect your preferred provider or SMS gateway.

⏳ Real-Time Notifications
Automatically notify your customers via SMS or Gateway when they place an order, when their order status changes, or upon completion of their purchase.

🎯 Personalized Messages
Customize SMS and Gateway templates with order details and other relevant information, ensuring your customers receive tailored and timely updates.

📦 Flexible Delivery Options
Choose to send an SMS, a Gateway message, or both simultaneously for maximum reach and engagement.

💬 Direct Customer Interaction
Because messages are sent from your personal accounts, customers can respond directly to you, creating a seamless and interactive communication channel.

🛠️ Easy Integration
Simple setup and configuration with WooCommerce, with no need for complex coding or third-party services.

📊 Comprehensive Logging
Track all SMS and Gateway activities with detailed logs, helping you monitor successful deliveries and troubleshoot any issues.

🔒 Secure and Private
Your data and customer information remain secure, with all messages sent directly from your phone or Gateway account, ensuring full control and privacy.


✨ Advanced Custom Rules & Conditions for SMS & Gateway

💡 100% Personalized SMS & Gateway Notifications!
Take full control of your messaging by defining custom rules based on your WooCommerce order details. No more generic notifications – send the right message at the right time with conditions tailored to each order!

✔ Rule-Based Messaging System – Create unlimited rules with flexible conditions.
✔ Trigger on Order Status Changes – Customize notifications for processing, completed, refunded orders, and more!
✔ Dynamic Conditions – Use customer email, order total, shipping method, and other order details to trigger messages.
✔ Multiple Conditions Per Rule – Example: "Order Total > $100" AND "Shipping Method = Express".
✔ Automated Message Sending – Messages are only sent when all defined conditions are met.
✔ Real-Time Execution – Your custom rules apply instantly when an order status is updated.
✔ Smart Logging – Keep track of rule execution and message delivery in detailed logs.

🎯 With this feature, your SMS notifications are not just automated – they are fully tailored to each customer's order!

📌 Additional Features:

✅ Over 50 Placeholders for Maximum Personalization
Insert dynamic data like order ID, customer name, total price, shipping details, and more to craft fully customized SMS messages.

✅ 🛎️ Dedicated Online Support
Access direct support via the plugin for seamless assistance whenever you need help.

✅ 🔍 Order Analysis for Better Rule Creation
Use the Check Order feature to analyze any existing order and understand its data structure, making it easier to set up precise rules.


**Why Choose SMS Mobile API?**

In today's digital world, building strong relationships with your customers requires timely and personalized communication. SMS Mobile API allows you to engage your customers instantly by sending SMS and Gateway notifications directly from your personal accounts. Whether it's order confirmations, status updates, or personalized thank-you messages, this plugin ensures your communication is not only effective but also direct and personal, with the added benefit of allowing your customers to reply to you instantly.

**How It Works:**

1. **Install and Activate:** Download the plugin and activate it through the WordPress admin dashboard.
2. **Configure Your Settings:** Enter your API key, set up your mobile number, and customize your SMS templates.
3. **Start Sending:** With everything configured, SMS Mobile API will automatically send notifications based on your settings, directly to your customers' phones from your personal mobile number.

**Get Started Today!**

Transform your WooCommerce store's customer communication with SMS Mobile API. Keep your customers informed, engage with them directly, and build stronger, more personal relationships—all through the power of SMS sent from your own mobile phone.

== Installation ==
**Installation Process**

Getting started with SMS Mobile API is quick and easy. Follow these steps to integrate and start sending SMS notifications from your personal mobile number:

1. **Download and Install the Plugin:**
   - Download the SMS Mobile API plugin and install it through the WordPress admin dashboard.
   - Activate the plugin to begin configuring your settings.

2. **Download the Official Mobile App:**
   - Head over to Google Play or Apple Store and download the official Sms Mobile API mobile app.
   - Install the app on your mobile phone.

3. **Generate Your API Key:**
   - Once the mobile app is installed, open it, and follow the prompts to generate your unique API key.
   - This key is essential for linking your WooCommerce store with your mobile phone.

4. **Enter the API Key in the Plugin:**
   - Return to your WordPress dashboard and navigate to the SMS Mobile API settings page.
   - Enter the API key provided by the mobile app into the designated field in the plugin settings.
   - Save your settings to complete the integration.

5. **Start Sending SMS:**
   - With the plugin and mobile app linked, your WooCommerce store is now ready to send SMS notifications directly from your mobile phone.
   - Every time a customer places an order or when their order status changes, a personalized SMS will be sent from your mobile number, allowing them to reply directly to you.

6. **Start Sending Gateway:**
   - To enable Gateway notifications, log in to the SMSMobileAPI dashboard and confirm the authentication of your Gateway account.
   - Simply scan the visible QR code in the dashboard to securely link your Gateway account with SMSMobileAPI.
   - This is a one-time operation designed to ensure secure communication between Gateway and SMSMobileAPI.
   - Once authenticated, your WooCommerce store can start sending personalized Gateway messages directly to your customers.
   
   
By following these steps, you can quickly and easily set up SMS Mobile API, ensuring seamless and direct communication with your customers through your personal mobile device.


== Third-Party Services and Data Disclosure ==

This plugin relies on the external service **SMSMobileAPI** to send SMS notifications. The plugin connects to the SMSMobileAPI platform to deliver SMS messages to the phone numbers provided by the user via WooCommerce. 

### What data is sent to SMSMobileAPI?
- **Phone numbers**: The phone number associated with the order (either billing or shipping phone number).
- **Order details**: The message template includes the order ID, and in some cases, details related to the order status.
- **API key**: The API key provided by the user during the plugin setup.

The data sent to SMSMobileAPI is required for the SMS delivery process. No additional data is sent beyond what is necessary for sending the SMS.

### Purpose of the connection:
The connection to SMSMobileAPI is established for the purpose of sending SMS notifications related to WooCommerce orders. This may include, but is not limited to, SMS messages confirming order receipt, notifying customers of changes in order status, and sending test SMS messages to verify API connectivity.

### External Service Links:
- **Service**: [SMSMobileAPI](https://smsmobileapi.com)
- **Gateway Service**: [SMSMobileAPI Gateway](https://smsmobileapi.com/Gateway)
- **Terms of Service**: [SMSMobileAPI Terms of Use](https://smsmobileapi.com/terms-and-conditions-of-sale/)
- **Privacy Policy**: [SMSMobileAPI Privacy Policy](https://smsmobileapi.com/privacy-policy//)

Please be aware that by using this plugin, data (including phone numbers and order details) will be transmitted to the SMSMobileAPI service for the purpose of delivering SMS notifications. Ensure that this is in compliance with your local data protection laws.

### How to Disable Notification :
If you do not wish to send SMS notifications or connect with SMSMobileAPI, you can disable the SMS features in the plugin settings by not entering an API key or unchecking the "Send SMS on Order Confirmation" and "Send SMS on Order Status Change" options.


== FAQ ==

❓ What is the SMSMobileAPI plugin for WooCommerce?

The SMSMobileAPI plugin for WooCommerce allows store owners to send SMS and Gateway messages for order notifications, customer updates, and more.
It works by using your own mobile device to send messages, ensuring reliability and cost efficiency.

❓ What can I do with this plugin?

With the SMSMobileAPI WooCommerce plugin, you can:
✅ Send Gateway messages for each order status updat
✅ Send SMS messages for each order status update.
✅ Send SMS from your own mobile or through your preferred SMS provider.
✅ Send SMS from your own SMS Gateway / Modem SIM
✅ Use custom keywords in SMS to personalize messages based on the order and customer details.
✅ Create rules and conditions to automatically trigger SMS based on order status, customer type, or other criteria.
✅ Send messages directly from a customer's profile page for quick communication.
✅ Choose between SMS, Gateway, or both for message delivery.
✅ View detailed message logs to track sent messages.
✅ Contact technical support directly through the plugin.


❓ Does it support Gateway messages?

Yes! You can also send Gateway messages via API by connecting your personal account.

❓How do I connect my external SMS service (e.g. Twilio, MessageBird, etc.) or  my SMS gateway?

Go to your SMSMobileAPI account dashboard (accessible from the plugin), then select your preferred SMS service and enter your credentials for that provider.
An API key will be automatically generated by SMSMobileAPI — simply copy and paste that API key into the SMSMobileAPI plugin settings, and your connection is ready!

❓ How does it work?

Install the SMS Mobile API app on your Android or iOS device.
Create an account via mobile app or via our website
Retrieve your API key from the app dashboard.
Use the API to send SMS via HTTP requests.

❓ Can I use my own phone number to send SMS?

Yes! SMS Mobile API uses your own mobile device to send SMS, meaning messages appear as if they were sent manually from your phone.


❓ Is SMS Mobile API free?

You get 3 days of free trial upon registration. 
After that, a monthly or annual subscription is required to continue using the service.
The plugin is free, but using the API to interconnect your communication channels requires a low-cost subscription.

❓ Can I send SMS internationally?

Yes! SMS Mobile API works worldwide as long as your phone has a valid SIM card with an active SMS plan.

❓ Why are my SMS not being sent?

Common reasons include:

    📶 No network connection – Ensure your phone has a mobile signal.
    🔑 Invalid API key – Verify that your API key is correctly set.
    📛 Wrong phone number format – Use international format (e.g., +336XXXXXXXX).
    🚀 Phone not powered on – The app must be running in the background.

❓ How can I receive SMS via the API?

Enable the Receive SMS feature in the app.
Use the API endpoint to fetch received messages in real-time.

❓ Can I use SMS Mobile API for bulk messaging?

Yes, but your phone carrier may have limits on the number of SMS you can send per day (contact your mobile provider for more informations).


❓ How secure is SMS Mobile API?

End-to-end encryption protects API communications.
Your SMS are not stored on third-party servers.
You are in full control of your SMS and Gateway, as they are sent from your device.

❓ Can I automate replies to incoming SMS?

Yes! You can set up an AI chatbot (powered by OpenAI) to automatically respond to SMS received on your phone.

❓ How can I get support?

1. Email: support@smsmobileapi.com
2. Via the plugin, there is a menu dedicated to technical support where messages are sent directly to the support team through the SMS Mobile API plugin.
	
	
❓  How do I customize SMS messages?

You can use custom keywords in your messages to personalize them. Example placeholders include:

	{customer_name} → Inserts the customer's name
	{order_id} → Inserts the order number
	{total_price} → Inserts the total order price
	and 50 other keywords to use  ! 

You can define and modify these templates in the plugin settings.

❓ Can I choose whether to send messages via SMS or Gateway?

Yes! You can configure messages to be sent via SMS, Gateway, or both at the same time.

❓ How do I set up custom rules for sending SMS?

The plugin allows you to create custom rules and conditions to trigger SMS messages based on:

	Order status changes (e.g., Order Completed, Payment Failed, etc.).
	Customer type (e.g., new vs. returning customer).
	Specific products or categories.
	Any other conditions you define.

You can set up these rules in the SMS Automation Settings of the plugin.
	
❓ Can I manually send messages to customers?

	Yes! You can send an SMS or Gateway message directly from a customer’s profile page in WooCommerce. This is useful for quick updates, personalized support, or promotions.
	
❓ Can I track sent messages?

Yes, the plugin provides a detailed log of all sent messages, including:

	The message content.
	The recipient’s phone number.
	The date and time of the message.
	The delivery status.

❓ How do I contact support?

You can contact technical support directly from the plugin’s interface. Just navigate to the Support section, describe your issue, and send your request.








== Screenshots ==
###  Plugin Settings  
![SMS Mobile API Settings](assets/screenshot-1.png)  

### Order Notifications  
![SMS Mobile API Notifications](assets/screenshot-2.png)  

### Custom Rules  
![SMS Mobile API Custom Rules for SMS](assets/screenshot-3.png)  

### Support and help 
![SMS Mobile API Support](assets/screenshot-4.png)  

### Keyword / Placeholder  
![SMS Mobile API Kyeword](assets/screenshot-5.png)  

### SMS Gateway Settings
![SMS Gateway Settings](assets/screenshot-6.png)  


== Changelog ==
= 2.0.17 - 2026-03-17 =
* File updates were made following internal testing.
= 2.0.16 - 2025-07-09 =
* Strengthened data handling across the entire plugin to prevent potential injection vulnerabilities.
= 2.0.15 - 2025-07-08 =
* Updated plugin codebase to ensure all function, class, constant, namespace, and option names use unique and consistent prefixes, avoiding common or reserved prefixes to prevent conflicts with other plugins and WordPress core.
* Refactored all AJAX hooks, functions, and class names to include the custom plugin prefix for improved compatibility and maintainability.
* Revised plugin metadata and readme to reduce keyword stuffing by shortening plugin name and removing excessive keyword repetition, in compliance with WordPress.org guidelines.
= 2.0.14 - 2025-07-08 = 
* Plugin updated and fully compliant with WordPress guidelines following the official plugin review process.
* Improved security by adding nonce verification and proper sanitization/escaping across all inputs and outputs.
* Fixed multiple code quality warnings reported by WordPress Plugin Check to ensure better stability and security.
* Enhanced codebase to meet WordPress.org plugin repository requirements and best practices.
= 2.0.13 - 2025-07-07 = 
 * Removal of brand, logo and other elements at the company’s request.
= 2.0.12 - 2025-07-03 = 
* QuickWizard: Debug for users running older versions of PHP.
* QuickWizard: Simplified the process for testing TEST messages for SMS and Gateway; now two separate buttons are available to independently test each sending channel (SMS or Gateway).
* QuickWizard: The log of test messages is now available in the sending history.
* Rules: Debugged and stabilized the module; it is now stable according to the plugin version you are using.
* Rules management : debug for users of user using older version of PHP
= 2.0.11 -  2025-07-01 =
* Update of the quickstart page to make it easier to set up the service during the first installation
* Debugged the button used to send a message to a user; the popup now displays correctly.
= 2.0.10 -  2025-06-24 =
* New: In addition to connecting your mobile device to send SMS, you can now connect external SMS services like Twilio, MessageBird, and more — or even link your own custom SMS Gateway to send messages directly!
= 2.0.9 -  2025-06-20 =
* In the sent message log, it is now possible to see the content of the message sent to the customer (available for future orders placed or processed) starting from version 2.0.9 of the plugin.
* In the sent message log, if there is an error, the type of error is now displayed next to the date and time.
* In the sent messages log, a color code allows you to differentiate messages sent successfully from those with errors.
* The log now displays the last 90 entries, whereas previously it showed only 30.
* Default order confirmation and status messages are now automatically translated and installed in the following languages when activating the plugin: English, French, Arabic, Spanish, German, Hindi, Italian, Japanese, Portuguese, Russian, Chinese
* By default, the plugin is available in English, but new languages are available : 
* Plugin translated into French
* Plugin translated into Italian
* Plugin translated into Spanish
* Plugin translated into Portuguese
* Plugin translated into German
* Plugin translated into Russian
* Plugin translated into Arabic
* Plugin translated into Chinese
* Plugin translated into Japanese 
* Plugin translated into Hindi
= 2.0.8 -  2025-06-20 =
* Update of the META_KEY and META_VALUE retrieval at multiple levels to be able to fetch all the information of an order.
= 2.0.7 -  2025-06-18 =
* Fixed a critical error that occurred on the order confirmation page with certain versions of WooCommerce.
* Resolved a logging issue where some WooCommerce versions misinterpreted the delivery status, causing false "failed" reports after sending a message.
* Improved log clarity: when a message is sent related to a new order, the log now explicitly states it is linked to a new order (whether SMS or Gateway).
= 2.0.6 -  2025-03-03 =
* New Feature: You can now use any [meta_key] from the order's post_meta, including all custom fields, in your SMS messages. 
= 2.0.5 -  2025-02-25 = 
* Modification of the welcome message during the plugin's first visit.
* Highlighting the connection status with the phone and ease of creating a new account
= 2.0.4 -  2025-02-10 = 
* Highlighting the version of the plugin used for better understanding with technical support
= 2.0.3 - 2025-01-31 =
* New Features
*Support Request Feature
-New! You can now send support requests directly from the plugin interface.
-Navigate to the Support Request section, enter your message, and click Send Request – it's that easy!
*Custom Rules for SMS & Gateway Notifications
-Introducing a powerful rule-based system! Automate SMS and Gateway notifications based on custom conditions.
-Custom Rules Panel – Create unlimited rules with flexible conditions.
-Trigger on Order Status Change – Define rules based on WooCommerce order statuses (e.g., Processing, Completed, Refunded).
-Dynamic Conditions – Compare order values like total price, customer email, shipping method, etc.
-Multiple Conditions Per Rule – Example: "Order Total > $100" AND "Shipping Method = Express".
-Automated Message Sending – If all conditions match, a customized SMS/Gateway message is sent.
-Enable/Disable Rules – Toggle individual rules ON/OFF from the admin panel.
-Real-Time Updates – Rules apply instantly when order statuses change.
-Smart Logs – Track message history and rule execution for better debugging.
*Order Status-Based Message Management
-Added checkboxes next to each order status to enable/disable message sending, instead of leaving the message field empty.
*Added Support for Additional WooCommerce Order Statuses:
-Checkout Draft (WooCommerce 8.1+) – Orders still in checkout, not completed.
-Shipped – Status added by shipping plugins when an order is dispatched.
-Delivered – Used when an order has been received by the customer.
-Partially Refunded – Indicates a partial refund of the order total.
-Returned – Status for orders sent back by the customer.
-Awaiting Payment – Used by payment gateways or invoice-based payments.
-Pre-Order – Differentiates pre-ordered products from regular orders.
-Invoiced – Status used by invoicing/accounting plugins for processed orders.
*Check Order Feature
-New! The "Check Order" menu allows retrieving complete order data to facilitate rule creation.
-Simply enter an existing order number, and the full order details will be displayed, helping you understand the structure.
*Enhanced Placeholder Support
-27 New Placeholders!
-Now, a total of 51 placeholders are available for message customization.
*Improved User Experience
-Better Tips & Placeholder Highlights – Making it easier to use and customize messages.
-User-Friendly Checkboxes – Enable/disable customer notifications with checkboxes instead of leaving fields empty.
-Modern Icons Added – Improved visual layout for a sleek, modern look.
= 2.0.2 -  2025-01-28 =
* Debugging regarding the phone number sometimes being marked as missing
* Rewriting all logs in English
= 2.0.1 - 2025-01-08 =
*New Features & Improvements
- Updated the test message sent when the "Test" button is clicked to enhance clarity.
- Added the ability to send Gateway messages directly from your own Gateway account.
- New option to choose between sending an SMS, a Gateway message, or both simultaneously.
- Introduced a new "Gateway Config" menu to provide detailed guidance on setting up the integration between WooCommerce and SMSMobileAPI.
- Added a dedicated log to differentiate between sent SMS and Gateway messages.
- Expanded API testing capabilities to include Gateway in addition to SMS.
*User Experience Enhancements
- Debugged the "Send Message" button, allowing users to send messages directly to customers more reliably.
- Enabled sending Gateway messages directly to customers from the user list.
- New functionality to choose between sending an SMS, a Gateway message, or both from the same interface in the user list.
- Added a "Subscription" menu to manage API subscriptions directly within the plugin.
*Advanced Messaging Features
- Introduced 23 new placeholders derived from WooCommerce order data. These include details like order totals, customer contact information, and more, to enhance message personalization.
*Bug Fixes
- Resolved various minor bugs to improve the plugin's overall stability and performance.
*Performance Improvements
- Optimized the plugin's workflow for seamless integration and enhanced speed when managing large volumes of messages.
= 1.1.0  - 01-11-2024 =
* New Feature: Added the ability to send SMS from the user listing via a "Send SMS" button.
* New Feature: Log: Detection if the file has write permissions or not.
* New Feature: Upon order confirmation by the customer, there is a check to verify if the SMS has already been sent to avoid multiple SMS sends in case of a page refresh.
* New Feature: Upon order confirmation by the customer, a comment is added to the order to confirm the SMS has been sent.
* Bug Fix: Resolved the API connection issue for SSL.
= 1.0.0 - 01-10-2024 =
* Initial version of the plugin.

