Integrated user management plugin for Botsino system with WooCommerce and automatic WhatsApp login credentials delivery
- Features
- Requirements
- Installation
- Configuration
- Usage
- Project Structure
- Development
- Contributing
- License
- ✅ Connect to Botsino system API
- ✅ Automatic user creation after WooCommerce purchase
- ✅ Advanced queue system for request processing
- ✅ Automatic login credentials delivery via WhatsApp
- ✅ WhatsApp messaging via Botsino API
- ✅ SMS delivery (configurable)
- ✅ Instant and queued messages
- ✅ Customizable message templates
- ✅ Create and edit users
- ✅ Single and bulk user deletion
- ✅ Duplicate mobile and email checking
- ✅ Expiration date management
- ✅ User status display
- ✅ Dashboard with complete statistics
- ✅ User list with filters and search
- ✅ Request queue management
- ✅ Advanced logging system
- ✅ Complete settings
- ✅ Automatic expiration date checking
- ✅ Pre-expiration reminders
- ✅ Automatic discount coupon generation
- ✅ Personalized messages
- ✅ Shortcode for website display
- ✅ Automatic duplicate user checking
- ✅ Instant confirmation message delivery
- ✅ Automatic WooCommerce order creation
- 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
- 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
cd wp-content/plugins/
git clone https://github.com/YOUR_USERNAME/botsino-manager.gitThen activate the plugin from the admin dashboard.
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
- Free Plan Product ID: Free trial product identifier
- Plan Mappings: WooCommerce plans mapping with Botsino
The plugin automatically registers the following Cron Jobs:
botsino_process_queue- Every minutebotsino_process_message_queue- Every minutebotsino_daily_expiration_check- Daily
- Go to Botsino → Create User
- Fill out the form
- Click Create User
- Go to Botsino → User List
- For bulk deletion, select users
- Click Delete Selected Items
- Go to Botsino → User Queue
- View request status
- Re-process requests if needed
- Go to Botsino → Logs
- Use filters for searching
- View detailed log information
To display the free trial form on a page:
[botsino_free_plan_popup]
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
- Each module has a single responsibility
- Easy to test and maintain
- Clear separation of concerns
- Classes loaded automatically
- No manual require statements
- Namespace-based organization
- Dependency Injection
- Single Responsibility Principle
- DRY (Don't Repeat Yourself)
- SOLID principles
- Config centralized in Constants class
- Helpers for common utilities
- Clear module boundaries
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
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
- 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
- Add automated tests
- Add PHPDoc blocks for better IDE support
- Create admin view templates
- Add logging improvements
- 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
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.
This project is licensed under the GNU General Public License v2.0 - see the LICENSE file for details.
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
For support and questions:
- Author: MirzaFreddy
- Website: https://ultrabot.ir
- Plugin URI: https://ultrabot.ir