Botsino User Management
Botsino Manager Plugin is a comprehensive WordPress plugin that integrates Botsino user management system with WooCommerce. It provides automated user creation, WhatsApp/SMS messaging, queue processing, reminder systems, and a professional admin panel for managing users and subscriptions.
Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/mirzafreddy/botsino-manager/archive/refs/heads/main.zip🤖 Botsino Manager Plugin
Integrated user management plugin for Botsino system with WooCommerce and automatic WhatsApp login credentials delivery
📖 Table of Contents
- Features
- Requirements
- Installation
- Configuration
- Usage
- Project Structure
- Development
- Contributing
- License
✨ Features
🔄 Automatic Integration
- ✅ Connect to Botsino system API
- ✅ Automatic user creation after WooCommerce purchase
- ✅ Advanced queue system for request processing
- ✅ Automatic login credentials delivery via WhatsApp
📨 Messaging System
- ✅ WhatsApp messaging via Botsino API
- ✅ SMS delivery (configurable)
- ✅ Instant and queued messages
- ✅ Customizable message templates
🎯 User Management
- ✅ Create and edit users
- ✅ Single and bulk user deletion
- ✅ Duplicate mobile and email checking
- ✅ Expiration date management
- ✅ User status display
📊 Professional Admin Panel
- ✅ Dashboard with complete statistics
- ✅ User list with filters and search
- ✅ Request queue management
- ✅ Advanced logging system
- ✅ Complete settings
🔔 Reminder System
- ✅ Automatic expiration date checking
- ✅ Pre-expiration reminders
- ✅ Automatic discount coupon generation
- ✅ Personalized messages
🎁 Free Trial Form
- ✅ Shortcode for website display
- ✅ Automatic duplicate user checking
- ✅ Instant confirmation message delivery
- ✅ Automatic WooCommerce order creation
📋 Requirements
- WordPress: 5.0 or higher
- WooCommerce: 3.0 or higher
- PHP: 7.4 or higher
- MySQL: 5.6 or higher
- Botsino account with API Key
🚀 Installation
Method 1: Manual Installation
- Download the plugin files
- Upload the
botsino-managerfolder towp-content/plugins/ - Go to WordPress Admin Dashboard
- Navigate to Plugins → Installed Plugins
- Activate the Botsino User Management plugin
Method 2: Via Git
cd wp-content/plugins/
git clone https://github.com/YOUR_USERNAME/botsino-manager.git
Then activate the plugin from the admin dashboard.
⚙️ Configuration
1. API Settings
Go to Botsino → Settings and enter the following:
- API Key: API key received from Botsino
- API URL: Botsino system API address
- WhatsApp Instance ID: WhatsApp instance identifier
- WhatsApp Access Token: WhatsApp access token
2. Product Settings
- Free Plan Product ID: Free trial product identifier
- Plan Mappings: WooCommerce plans mapping with Botsino
3. Activate Cron Jobs
The plugin automatically registers the following Cron Jobs:
botsino_process_queue- Every minutebotsino_process_message_queue- Every minutebotsino_daily_expiration_check- Daily
📖 Usage
Manual User Creation
- Go to Botsino → Create User
- Fill out the form
- Click Create User
View User List
- Go to Botsino → User List
- For bulk deletion, select users
- Click Delete Selected Items
Queue Management
- Go to Botsino → User Queue
- View request status
- Re-process requests if needed
View Logs
- Go to Botsino → Logs
- Use filters for searching
- View detailed log information
Using Shortcode
To display the free trial form on a page:
[botsino_free_plan_popup]
📁 Project Structure
botsino-manager/
├── botsino-manager.php # Main plugin file (50 lines bootstrap)
├── includes/
│ ├── Core/
│ │ ├── Plugin.php # Main plugin orchestrator
│ │ ├── Loader.php # Hook loader
│ │ ├── Activator.php # Activation handler
│ │ └── Deactivator.php # Deactivation handler
│ ├── Config/
│ │ └── Constants.php # All constants and mappings
│ ├── Database/
│ │ └── DatabaseManager.php # Database table management
│ ├── Helpers/
│ │ ├── PhoneNormalizer.php # Phone number utilities
│ │ └── DateHelper.php # Date/time utilities
│ ├── API/
│ │ └── APIClient.php # Botsino API communication
│ ├── Users/
│ │ ├── UserManager.php # User CRUD operations
│ │ └── ExpirationManager.php # Expiration data management
│ ├── Queue/
│ │ ├── QueueManager.php # Main queue processing
│ │ └── MessageQueue.php # Message queue processing
│ ├── Notifications/
│ │ ├── WhatsAppSender.php # WhatsApp messaging
│ │ └── SMSSender.php # SMS messaging
│ ├── Reminders/
│ │ ├── ReminderManager.php # Reminder system
│ │ └── CouponGenerator.php # Coupon generation
│ ├── Admin/
│ │ ├── AdminMenu.php # Admin menu registration
│ │ ├── SettingsPage.php # Settings page handler
│ │ └── Views/
│ │ ├── MainPage.php # Main admin page with tabs
│ │ └── RemindersPage.php # Reminders management page
│ └── Public/
│ └── FreePlanForm.php # Free plan form shortcode
├── README.md
├── README_EN.md # English documentation
├── STRUCTURE.md # Complete architecture documentation
└── LICENSE # GPL v2 License
🎯 Key Improvements
1. Modular Architecture
- Each module has a single responsibility
- Easy to test and maintain
- Clear separation of concerns
2. PSR-4 Autoloading
- Classes loaded automatically
- No manual require statements
- Namespace-based organization
3. Professional Patterns
- Dependency Injection
- Single Responsibility Principle
- DRY (Don't Repeat Yourself)
- SOLID principles
4. Better Organization
- Config centralized in Constants class
- Helpers for common utilities
- Clear module boundaries
🔧 Functionality Preserved
Every single feature from the original 5000-line file is preserved:
- ✅ User creation/update in Botsino
- ✅ WooCommerce integration
- ✅ Queue system (main + message)
- ✅ Reminder system with coupons
- ✅ SMS and WhatsApp notifications
- ✅ Admin panel with all tabs
- ✅ Settings page
- ✅ Free plan popup form
- ✅ Expiration tracking
- ✅ Cron jobs
- ✅ All database tables
- ✅ All API calls
- ✅ All hooks and filters
📝 Code Quality
Before: 4804 lines in one file After: Modular structure with ~150-300 lines per file
Benefits:
- Easy to find code
- Simple to debug
- Fast to modify
- Professional structure
- Testable modules
- Scalable architecture
🚀 Development
Testing Checklist
- [ ] Plugin activates without errors
- [ ] WooCommerce order completion triggers user creation
- [ ] Queue processing works via cron
- [ ] Message queue sends WhatsApp/SMS
- [ ] Reminders system checks expirations
- [ ] Coupons generate correctly
- [ ] Admin panels load properly
- [ ] Settings save correctly
- [ ] Free plan form works
- [ ] All hooks fire correctly
Next Steps
- Add automated tests
- Add PHPDoc blocks for better IDE support
- Create admin view templates
- Add logging improvements
💡 Notes
- No functionality changed - this is a pure refactor
- All existing code logic preserved exactly
- Database structure unchanged
- API calls identical
- Hook names unchanged for compatibility
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
📄 License
This project is licensed under the GNU General Public License v2.0 - see the LICENSE file for details.
🏷️ Topics/Tags
wordpress, woocommerce, plugin, user-management, botsino, whatsapp, sms,
api-integration, queue-system, notifications, reminders, php, gpl-2.0,
modular-architecture, psr-4, automated-messaging, e-commerce, subscription-management
📞 Support
For support and questions:
- Author: MirzaFreddy
- Website: https://ultrabot.ir
- Plugin URI: https://ultrabot.ir