WooCommerce Production Manager
A WooCommerce plugin to manage production capacity, delivery dates, and order item statuses.
by neodesign · github.com/david-mkoch/woocommerce-production-manager
★ 0stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/david-mkoch/woocommerce-production-manager/archive/refs/heads/main.zipA comprehensive WooCommerce plugin to manage production capacity, delivery dates, order item statuses, reports, SMS notifications, and REST API integration.
Features
- Production Capacity Management: Set and track capacity for product categories, products, and variations.
- Delivery Date Calculation: Automatically calculate delivery dates based on capacity and holidays, displayed at checkout.
- Order Item Status Management: Track and update statuses for individual order items with customizable statuses.
- Customer Status Tracker: Allow customers to view order item statuses via a dedicated frontend page.
- Reports: Generate reports for category orders, full capacity days, and status logs with Excel export.
- SMS Notifications: Send SMS notifications for order item status changes (requires an SMS provider API).
- REST API: Access capacity, order items, and reports via REST API with API key authentication.
- Webhook Support: Receive real-time notifications for order item status changes.
- Persian Calendar Support: Display dates in Persian (Jalali) calendar for Iran-based stores.
Requirements
- WordPress 5.0 or higher
- WooCommerce 5.0 or higher
- PHP 7.4 or higher
- Composer (for installing dependencies)
- MySQL 5.7 or higher
Installation
- Download the Plugin:
- Download the
woocommerce-production-manager.zipfile from the latest release.
- Download the
- Install via WordPress:
- Navigate to
Plugins > Add New > Upload Pluginin your WordPress admin panel. - Upload the ZIP file and click
Install Now. - Activate the plugin.
- Navigate to
- Install Dependencies:
- Run
composer installin the plugin directory (wp-content/plugins/woocommerce-production-manager/) to install required PHP libraries (morilog/jalali,phpoffice/phpspreadsheet). - Alternatively, use the pre-built ZIP with the
vendor/directory included.
- Run
- Verify WooCommerce:
- Ensure WooCommerce is installed and activated.
Configuration
- Access Settings:
- Go to
WooCommerce > Production Managerin the WordPress admin panel.
- Go to
- General Settings:
- Set default delivery days and customize order item statuses with names and colors.
- Holidays:
- Define weekly holidays and custom holiday dates to exclude from delivery calculations.
- SMS Notifications:
- Enable SMS, enter your SMS provider API key, and customize the SMS template.
- Customers can opt-in/out of SMS notifications via their account page.
- API & Webhook:
- Generate an API key for REST API authentication.
- Configure a webhook URL to receive order item status change notifications.
- Production Capacity:
- Set maximum production capacity for categories, products, or variations in the settings tab.
Usage
- Admin Interface:
- Manage order item statuses and delivery dates under
WooCommerce > Order Items. - View reports under
WooCommerce > Production Reports(category orders, full capacity days, status logs). - Export reports and logs to Excel.
- View and filter status logs under
WooCommerce > Status Logs.
- Manage order item statuses and delivery dates under
- Customer Interface:
- Customers can view order item statuses at
/my-account/order-status/(requires login). - Customers can enable/disable SMS notifications in their account settings.
- Customers can view order item statuses at
- Checkout:
- Estimated delivery dates are displayed for each product based on capacity and holidays.
REST API
The plugin provides a REST API for accessing data. Use the API key in the X-API-Key header for authentication.
Endpoints
- GET
/wp-json/wpm/v1/capacity:- Parameters:
date,entity_type(category, product, variation),entity_id,persian_date(boolean). - Returns: Capacity details for the specified date and entity.
- Parameters:
- GET
/wp-json/wpm/v1/order-items:- Parameters:
status,category,date_from,date_to,persian_date(boolean). - Returns: List of order items with filters.
- Parameters:
- GET
/wp-json/wpm/v1/reports/{type}:- Types:
category-orders,full-capacity. - Parameters:
date_from,date_to,persian_date(boolean). - Returns: Report data based on the type.
- Types:
Webhook
- Configure a webhook URL in the settings to receive JSON payloads for order item status changes.
- Payload includes:
event,order_id,order_item_id,item_name,old_status,new_status,delivery_date,order_date,timestamp.
SMS Integration
- The plugin supports SMS notifications via an external SMS provider.
- Replace the sample API URL in
src/SMS/SMS.phpwith your provider’s API endpoint (e.g., Kavenegar, Melipayamak). - Example payload:
{ "api_key": "your_api_key", "to": "customer_phone_number", "message": "Order #123 status changed to Processing." }
Persian Date Support
- Dates are displayed in the Persian (Jalali) calendar by default.
- Use the
persian_date=falseparameter in API requests to get Gregorian dates. - The plugin uses the
morilog/jalalilibrary for date conversions.
Troubleshooting
- Composer Errors: Ensure Composer is installed and run
composer installin the plugin directory. - API Authentication Issues: Verify the API key in
WooCommerce > Production Manager > Webhook & API. - SMS Not Sending: Check the SMS provider API key and template settings. Ensure the customer has a valid phone number and SMS notifications enabled.
- Date Issues: Ensure the server timezone is set correctly in WordPress settings.
Support
- Documentation: Available in the plugin settings under
WooCommerce > Production Manager. - Issues: Report bugs or request features via the GitHub repository (if available) or contact the developer.
- Customizations: For custom SMS provider integrations or additional features, contact the developer.
License
This plugin is licensed under the GPL-2.0+ license.
Credits
- Built with morilog/jalali for Persian date support.
- Uses phpoffice/phpspreadsheet for Excel exports.
- Persian Datepicker by persian-datepicker.
Developed by Your Name