=== 30site Router User Manager for MikroTik === Contributors: hadimostafaei Tags: mikrotik, woocommerce, user-manager, radius, hotspot Requires at least: 6.0 Tested up to: 7.1 Requires PHP: 7.3 Stable tag: 1.2.1 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Connect WooCommerce to MikroTik User Manager (RouterOS 7). Test the connection and view your profiles and data limits inside WordPress. == Description == **30site Router User Manager for MikroTik** links your WordPress store (WooCommerce) to the User Manager on your own MikroTik RouterOS 7 device, using MikroTik's official REST API. It is the foundation for selling internet, hotspot and VPN subscriptions directly through WooCommerce. This is the **free edition**. It focuses on the connection and a live, read-only view of your User Manager, so you can confirm everything works before you start selling: * **Connect to your router** over the official REST API (secure `www-ssl`), with the password stored encrypted. * **Test the connection** with clear, friendly diagnostics (TLS, certificate, firewall and authentication hints) so setup problems are easy to solve. * **View your profiles** — name, validity, data volume and attached limitations — read live from User Manager. * **Monitor your users** — a live, read-only dashboard of your User Manager users with plan, status, start and expiry dates, data volume and live data usage, plus search and one-click CSV export. * **See the WooCommerce integration** — a MikroTik tab appears on each product, previewing how products map to profiles. * **Fully translated** — the whole interface follows the WordPress language automatically in 10 bundled languages, with right-to-left support. The free edition is intentionally **read-only**: it never creates, changes or deletes anything on your router, and it cannot provision accounts. = Turn it into a store with the Pro edition = The **Pro edition** adds the full self-service billing workflow: * Create the User Manager account **automatically when an order is paid**. * Map each WooCommerce product to a **profile and server**. * **Automatic renewals** using stacked user-profiles, with no service interruption. * A **customer account panel** showing live usage, remaining data, expiry date and credentials. * **Scheduled usage sync** from RouterOS. * **Multiple servers**, **per-product downloadable config files** (such as `.ovpn`), **shortcodes** for Elementor and custom layouts, **7 account-card designs** and **10 bundled languages**. Learn more about the Pro edition: https://30site.ir/ = Languages = Ships ready-translated in English, Persian (فارسی), Arabic (العربية), Russian (Русский), Chinese (简体中文), German (Deutsch), French (Français), Spanish (Español), Turkish (Türkçe) and Portuguese – Brazil (Português do Brasil). The interface follows each visitor's WordPress language automatically, and right-to-left languages switch direction on their own. = Who is it for? = ISPs, hotspot operators, and VPN/OpenVPN resellers who run MikroTik RouterOS 7 User Manager and want to sell and renew subscriptions through WooCommerce. = Privacy & external services = This plugin communicates only with the **MikroTik router you configure** (the host, username and password you enter). It does not send your data to any third party. The "Upgrade to Pro" and "Support" links point to the developer's website (https://30site.ir/) and Telegram (@OnlineSupporttttt), and are only opened when you click them. == Installation == 1. Make sure **WooCommerce** is installed and active. 2. Upload the plugin to `/wp-content/plugins/`, or install it from **Plugins → Add New**. 3. Activate the plugin. 4. On your MikroTik router, enable the REST API over the `www-ssl` service and create an API user with User Manager read permission. 5. In WordPress go to **MikroTik UM → Connection**, enter the host, API username and password, save, then click **Test connection**. 6. Open **MikroTik UM → Profiles** to see your User Manager profiles. == Frequently Asked Questions == = Does the free edition create accounts on my router? = No. The free edition is read-only. It can test the connection and display your profiles, but it never creates, edits or deletes users. Automatic account creation is part of the Pro edition. = What do I need on the MikroTik side? = RouterOS 7 with User Manager, the REST API enabled on the `www-ssl` service, and an API user with permission to read User Manager. A concise step-by-step guide is built into the plugin at **MikroTik UM → Setup guide**. = How do I enable the REST API over SSL? = In short: create a certificate, assign it to the `www-ssl` service and enable the service, then create an API user. The exact RouterOS commands are in **MikroTik UM → Setup guide** inside the plugin. For quick testing you can use the plain `www` service and turn SSL off in the connection settings, but SSL is recommended for production. = Is my router password stored safely? = Yes. The password is encrypted at rest using a key derived from your WordPress security salts, and it is never shown back in the form. = Does it work with self-signed certificates? = Yes. Turn off "Verify SSL certificate" in the connection settings when your router uses a self-signed certificate. = Which RouterOS versions are supported? = RouterOS 7.x with the REST API (the User Manager v5 REST endpoints). == Screenshots == 1. Connection settings with a one-click, read-only connection test. 2. Live, read-only list of your User Manager profiles, validity and data volume. 3. Live, read-only users dashboard with status, dates, data usage and CSV export. 4. Free vs Pro feature comparison. 5. The MikroTik tab on a WooCommerce product (Pro preview). == Changelog == = 1.2.1 = * The "Upgrade to Pro" links now open the secure Pro checkout page directly. = 1.2.0 = * Renamed to "30site Router User Manager for MikroTik". * Product-tab icon CSS is now added with wp_add_inline_style() instead of an inline style tag. * Minor housekeeping for the WordPress.org plugin directory. = 1.1.0 = * Users dashboard: clearer status (Active, Scheduled, Expired, Enabled, Disabled) read from the live User Manager state. * Users dashboard: removed the empty "Start" column (User Manager does not expose a reliable start date) and show an em dash for any date the router does not return. * Connection page: added a one-click button to open the built-in Setup guide. * Setup guide: added a note that the secure (www-ssl) port is not always 443, with the command to check the port your router actually uses. * Translation updates for the new strings across all 10 bundled languages. = 1.0.0 = * Initial release: router connection, connection test with diagnostics, read-only profile viewer, read-only users dashboard (status, dates, live data usage, search and CSV export), and WooCommerce product-tab preview. Available in 10 languages. == Upgrade Notice == = 1.2.1 = The "Upgrade to Pro" links now open the secure Pro checkout page. = 1.2.0 = Plugin renamed and prepared for the WordPress.org directory. = 1.1.0 = Clearer user statuses, a Setup-guide shortcut on the connection page, and a note about non-standard SSL ports. = 1.0.0 = First release of the free edition.