Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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.

License

Notifications You must be signed in to change notification settings

MirzaFreddy/botsino-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 Botsino Manager Plugin

WordPress WooCommerce PHP License

Integrated user management plugin for Botsino system with WooCommerce and automatic WhatsApp login credentials delivery


📖 Table of Contents


✨ 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

  1. Download the plugin files
  2. Upload the botsino-manager folder to wp-content/plugins/
  3. Go to WordPress Admin Dashboard
  4. Navigate to PluginsInstalled Plugins
  5. 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 BotsinoSettings 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 minute
  • botsino_process_message_queue - Every minute
  • botsino_daily_expiration_check - Daily

📖 Usage

Manual User Creation

  1. Go to BotsinoCreate User
  2. Fill out the form
  3. Click Create User

View User List

  1. Go to BotsinoUser List
  2. For bulk deletion, select users
  3. Click Delete Selected Items

Queue Management

  1. Go to BotsinoUser Queue
  2. View request status
  3. Re-process requests if needed

View Logs

  1. Go to BotsinoLogs
  2. Use filters for searching
  3. 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

  1. Add automated tests
  2. Add PHPDoc blocks for better IDE support
  3. Create admin view templates
  4. 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:

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages