WooCommerce Delivery & Logistics Management
Production-grade WooCommerce delivery and logistics management plugin built with modern PHP and WordPress engineering practices.
by mhira2602-art · github.com/mhira2602-art/woocommerce-delivery-management
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/mhira2602-art/woocommerce-delivery-management/archive/refs/heads/main.zipReadme
WooCommerce Delivery & Logistics Management
Foundation for a maintainable WooCommerce delivery and logistics management plugin.
Current Status
This project is in active development. The foundation and database persistence layer are implemented. Delivery workflows, admin screens, REST API routes, AJAX endpoints, cron jobs, reporting UI, and business logic belong to later milestones.
Requirements
- WordPress
- WooCommerce
- PHP 7.4 or later
- Composer
Development Setup
- Place the plugin in
wp-content/plugins/woocommerce-delivery-management. - Run
composer installinside the plugin directory. - Activate the plugin from the WordPress admin Plugins screen.
- Ensure WooCommerce is installed and active.
WooCommerce Integration
The plugin is structured to work with WooCommerce without hard-coding WooCommerce internals into the delivery domain. When WooCommerce is active, the plugin registers a small integration layer that listens for order lifecycle events, checks whether the order is physical and eligible, and then creates a delivery via the existing application service.
The integration uses the public WooCommerce APIs (wc_get_order(), WC_Order, and order getters) and is compatible with HPOS by avoiding direct reads from wp_posts, wp_postmeta, or WooCommerce's internal table structure. The delivery record stores only the operational order ID and delivery data it actually needs.
Idempotency is enforced at the application layer and in the delivery schema by requiring a unique order_id per delivery. Repeated WooCommerce events will not create duplicate deliveries.
Admin UI
Milestone 6 adds a WordPress admin interface for operational delivery management. The plugin registers a Delivery Management menu with dashboard, deliveries, drivers, warehouses, and delivery rules screens. The admin layer validates requests, verifies nonces and capabilities, and delegates all business work to the existing application services.
For installation, security, and request flow details, see docs/admin.md.
Development
Install Composer dependencies from the plugin directory:
composer install
Run the unit tests:
composer test
Run static analysis:
composer phpstan
Run WordPress Coding Standards checks:
composer phpcs
Run the complete quality check:
composer check
Architecture Overview
woocommerce-delivery-management.phphandles WordPress bootstrap and dependency checks.src/Application/Bootstrap.phpinitializes the application layer.src/Support/Container.phpprovides a minimal internal dependency-injection foundation.src/Infrastructure/Database/provides the$wpdbboundary and versioned schema manager.src/Infrastructure/Repository/contains focused repositories for plugin-owned operational data.tests/Unit/covers persistence contracts without pretending to simulate MySQL.docs/database.mddocuments the schema, indexes, relationships, and scaling considerations.
This project is under active development.