=== Delivery Manager for WooCommerce ===
Contributors: beautifulplugins, kawsarahmedr
Tags: delivery, shipping, order management, delivery tracking, logistics
Tested up to: 7.0
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A comprehensive delivery management solution for WooCommerce to efficiently manage local deliveries.

== Description ==

**Delivery Manager for WooCommerce** is a complete delivery management solution for WooCommerce that helps you efficiently manage and track order deliveries. Perfect for restaurants, grocery stores, pharmacies, and any business offering local delivery services.

This plugin simplifies your delivery workflow by enabling you to assign delivery personnel to orders, track delivery status with visual timelines, and keep customers informed throughout the entire delivery process.

[**🚀 Upgrade to Pro**](https://beautifulplugins.com/plugins/delivery-manager-pro/) | [**📄 Plugin Documentation**](https://beautifulplugins.com/docs/) | [**💻 Support**](https://beautifulplugins.com/contact/)

### 🚀 Key Features for Delivery Management:

**For Store Administrators:**
* **Delivery Person Role** - Dedicated user role with specific capabilities for delivery staff
* **Smart Order Assignment** - Assign delivery personnel to orders with AJAX-powered search
* **Delivery Status Tracking** - Track "Out for Delivery" and "Delivered" status for each order
* **Delivery Details Metabox** - Comprehensive metabox in the order edit screen for delivery management
* **Automatic Order Notes** - System adds notes when the delivery person is assigned or status changes
* **Settings Panel** - Configure auto-completion and delivery workflow options
* **HPOS Compatible** - Full support for WooCommerce High-Performance Order Storage
* **Block Editor Support** - Compatible with WooCommerce Cart and Checkout Blocks

**For Delivery Personnel:**
* **Dedicated My Account Section** - "Deliveries" menu item with personalized delivery dashboard
* **Delivery Queue** - View all assigned deliveries in an organized, sortable table
* **Complete Order Details** - Access customer name, address, phone, email, and order items
* **Status Management** - Mark orders as "Out for Delivery" or "Delivered" from the frontend
* **Visual Timeline** - See delivery progress with icon-based timeline display
* **Mobile-Optimized** - Fully responsive interface for managing deliveries on the go

**For Customers:**
* **Delivery Information Display** - Dedicated section on order details and thank you pages
* **Visual Timeline** - Track delivery progress from order placement to delivery
* **Delivery Person Details** - Know who is assigned to deliver your order
* **Real-Time Status Updates** - See current status: Processing, Out for Delivery, or Delivered
* **Expected Delivery Date** - Automatic calculation of estimated delivery timeframe
* **Complete Transparency** - Full visibility into your delivery journey

### 🎯 Perfect For:

* **Restaurants & Food Delivery Services** - Manage food orders and coordinate delivery drivers
* **Grocery Stores & Supermarkets** - Organize grocery delivery operations efficiently
* **Pharmacies & Medical Suppliers** - Handle prescription and medical supply deliveries
* **Flower Shops & Gift Stores** - Coordinate local delivery of flowers and gifts
* **Local E-commerce Stores** - Add professional delivery management to any WooCommerce store

### 💼 How It Works?

1. **Create Delivery Personnel** - Add new users with the "Delivery Person" role
2. **Assign to Orders** - Use the Delivery Details metabox to search and assign delivery staff
3. **Delivery Staff Logs In** - Personnel access their assigned deliveries via My Account
4. **Update Status** - Mark orders "Out for Delivery" when departing, "Delivered" when complete
5. **Customers Stay Informed** - Order pages show delivery progress and status updates

### 🔧 Advanced Features:

**Seamless WooCommerce Integration:**
* Native WooCommerce order management integration
* HPOS (High-Performance Order Storage) compatibility declared
* Works with all standard WooCommerce order statuses
* Custom meta data stored without conflicts
* Compatible with WooCommerce Blocks

**Secure Role Management:**
* Custom "Delivery Person" role with specific capabilities
* Role-based access control for secure operations
* Delivery personnel only see their assigned orders
* Administrators maintain complete control
* Proper capability checks throughout

**Visual Timeline System:**
* Icon-based delivery progress display
* Automatic tracking of key timestamps
* Order placed, delivery assigned, out for delivery, delivered
* Expected delivery date calculation
* Clean, user-friendly interface

**Developer Friendly:**
* Well-documented code following WordPress standards
* Multiple action hooks for customization
* Filter hooks for modifying functionality
* Template override support
* AJAX-powered interfaces
* Clean separation of admin and frontend code

**Configurable Settings:**
* Auto-complete delivery on order completion
* Auto-complete order when marked delivered
* Extensible settings panel with action hooks
* Per-site configuration options

### 📱 Mobile Responsive Design:

All interfaces—admin metaboxes, delivery dashboards, and customer views—are fully responsive and work seamlessly on smartphones and tablets. Delivery personnel can easily manage their assignments on the go.

### 🔒 Security & Performance:

* Built following WordPress and WooCommerce security standards
* Nonce verification on all form submissions
* Capability checks before any actions
* Sanitized and validated user inputs
* Escaped outputs to prevent XSS
* Optimized database queries
* Minimal performance impact on your store

== Installation ==

### Minimum Requirements:

* WordPress 5.0 or higher
* WooCommerce 3.0 or higher
* PHP version 7.4 or higher
* MySQL version 5.6 or higher OR MariaDB version 10.1 or higher

### Automatic Installation:

1. Log in to your WordPress dashboard
2. Go to **Plugins → Add New**
3. Search for "Delivery Manager for WooCommerce"
4. Click **Install Now** next to Delivery Manager for WooCommerce
5. Click **Activate** after installation completes

### Manual Installation:

1. Download the plugin ZIP file
2. Log in to your WordPress dashboard
3. Navigate to **Plugins → Add New → Upload Plugin**
4. Click **Choose File** and select the downloaded ZIP
5. Click **Install Now**
6. Click **Activate Plugin** when installation finishes

### Configuration Steps:

1. **Plugin automatically creates** the "Delivery Person" user role upon activation
2. **Create delivery personnel:**
   * Go to **Users → Add New**
   * Fill in user details
   * Select "Delivery Person" from the Role dropdown
   * Click **Add New User**
3. **Assign deliveries to orders:**
   * Go to **WooCommerce → Orders**
   * Click on any order to edit
   * Find the "Delivery Details" metabox
   * Search for and select a delivery person
   * Check "Out for Delivery" or "Delivered" as needed
   * Update the order
4. **Configure settings:**
   * Go to **WooCommerce → Delivery Manager for WooCommerce**
   * Enable auto-complete options as desired
   * Click **Save Changes**
5. **Delivery personnel access:**
   * Delivery staff log in to their account
   * Navigate to **My Account → Deliveries**
   * View and manage assigned orders

== Frequently Asked Questions ==

= What is Delivery Manager for WooCommerce? =
Delivery Manager for WooCommerce is a WooCommerce plugin that helps you manage local deliveries. It allows you to assign delivery personnel to orders, track delivery progress, and keep customers informed about their delivery status.

= Do I need WooCommerce to use this plugin? =
Yes, Delivery Manager for WooCommerce is built specifically for WooCommerce. You must have WooCommerce installed and activated for this plugin to work.

= How do I create delivery personnel accounts? =
Go to **Users → Add New** in WordPress, create a new user, and assign them the "Delivery Person" role. You can also edit existing users and change their role to "Delivery Person".

= Can delivery personnel see all orders in my store? =
No, delivery personnel can only view orders that have been specifically assigned to them. This ensures privacy and security for all your customers.

= Can I assign multiple delivery persons to one order? =
The current version supports one delivery person per order. This keeps the delivery chain clear and maintains accountability.

= How do customers see their delivery status? =
Customers can view delivery information on their order details page (accessible from My Account → Orders). They'll see a visual timeline with delivery progress and status.

= Can delivery personnel update order status themselves? =
Yes, delivery personnel can mark orders as "Out for Delivery" when they leave for delivery and "Delivered" once they complete the delivery. Admins can also update these statuses.

= Is this plugin compatible with WooCommerce HPOS? =
Yes, Delivery Manager for WooCommerce fully supports and declares compatibility with WooCommerce High-Performance Order Storage (HPOS).

= Can I customize the delivery timeline appearance? =
Yes, you can override the plugin templates in your theme. Copy templates from the plugin to `yourtheme/woocommerce/` directory and customize as needed.

= Does it work with custom WooCommerce order statuses? =
Yes, the plugin works alongside both standard and custom WooCommerce order statuses without conflicts.

= Will this work with my WordPress theme? =
Yes, Delivery Manager for WooCommerce follows WordPress and WooCommerce standards and will work with any properly coded WordPress theme.

= Is the plugin translation-ready? =
Yes, the plugin uses the 'delivery-manager-for-woocommerce' text domain and is fully translation-ready. You can translate it using plugins like Loco Translate or provide .po/.mo files.

= Can delivery personnel access customer payment details? =
No, delivery personnel can only see information needed for delivery: customer name, delivery address, phone number, and email. Payment information is not accessible.

= How is delivery data stored? =
All delivery information is stored as order meta data in your WordPress database. No external services are used.

= What happens if I deactivate the plugin? =
Delivery person accounts remain but lose delivery capabilities. All order meta data is preserved. You can safely reactivate the plugin without losing data.

= Can I get support if I have issues? =
Yes, visit [BeautifulPlugins.com](https://beautifulplugins.com/plugins/delivery-manager-pro/) for documentation and support options.

== Screenshots ==
1. **Delivery Timeline** - Visual progress tracker with icons showing order journey from placement to delivery.
2. **Order Page** - Delivery information and timeline visible to the admin order page.
3. **Settings Panel** - Configure auto-complete and delivery options in WooCommerce settings.

== Changelog ==
= 1.1.0 ( 16th June 2026 ) =
New: Added expected delivery date calculation based on order date and configurable delivery timeframe.
Fix: Minor bug fixes on delivery timeline display incorrectly on order confirmation page.
Compatibility: Tested and verified compatibility with WooCommerce 10.8. & WordPress 7.0.

= 1.0.4 ( 20th April 2026 ) =
Compatibility: Check compatibility with the latest version of WooCommerce 10.7.

= 1.0.3 =
Compatibility: Maintenance release with compatibility check for the latest version of WooCommerce 10.5.

= 1.0.2 ( 3rd February 2026 ) =
* Compatibility check with WordPress 6.9
* Compatibility check with WooCommerce 10.3

= 1.0.0 ( 14th December 2023 ) =
* Initial release
* Created custom "Delivery Person" user role with specific capabilities
* Added Delivery Details metabox to order edit screen
* Implemented AJAX-powered delivery person search and assignment
* Added delivery status tracking (Out for Delivery, Delivered)
* Created My Account → Deliveries section for delivery personnel
* Built delivery queue with sortable table display
* Implemented visual delivery timeline with icons and progress tracking
* Added customer-facing delivery information display on order pages
* Automatic order notes when delivery person assigned or status changes
* Created settings panel with configuration options
* Auto-complete delivery when order marked as complete
* Auto-complete order when marked as delivered by delivery person
* Template override support for customization
* Full HPOS (High-Performance Order Storage) compatibility
* WooCommerce Blocks compatibility declared
* Mobile-responsive design for all interfaces
* Multiple developer hooks and filters
* Complete translation support with 'delivery-manager-for-woocommerce' text domain
* Security features: nonce verification, capability checks, input sanitization
* Performance optimized with efficient database queries

== Upgrade Notice ==
= 1.1.0 =
Added expected delivery date calculation based on order date and configurable delivery timeframe. Tested and verified compatibility with WooCommerce 10.8. & WordPress 7.0.

== Privacy Policy ==
Delivery Manager for WooCommerce respects your privacy and does not collect or transmit any data outside your WordPress installation.

**Data Stored Locally:**
* Delivery person assignment (order meta: `_dman_delivery_person`)
* Delivery status flags (order meta: `_dman_is_out_for_delivery`, `_dman_is_delivered`)
* Timestamp data (order meta: `_dman_delivery_assigned_date`, `_dman_out_for_delivery_date`, `_dman_delivered_date`)
* User role assignment (wp_usermeta: `dman_delivery_person` role)

**Data Access:**
* **Administrators** can view and manage all delivery data
* **Delivery Personnel** can only view their own assigned orders
* **Customers** can view delivery information for their own orders only

**Data Retention:**
* Delivery data is tied to WooCommerce orders
* Follows your WooCommerce data retention and deletion policies
* Deleting an order removes associated delivery metadata
* Uninstalling the plugin removes the custom user role

**Third-Party Services:**
* No data is sent to or stored on external services
* No tracking or analytics performed by the plugin
* All data remains within your WordPress database

== Developer Documentation ==

### Template Overrides

Override plugin templates by copying to your theme:

**Order Delivery Details:**
Copy: `plugins/delivery-manager-for-woocommerce/templates/order/order-delivery-details.php`
To: `yourtheme/woocommerce/order/order-delivery-details.php`

**Deliveries List:**
Copy: `plugins/delivery-manager-for-woocommerce/templates/myaccount/deliveries.php`
To: `yourtheme/woocommerce/myaccount/deliveries.php`

**View Single Delivery:**
Copy: `plugins/delivery-manager-for-woocommerce/templates/myaccount/view-delivery.php`
To: `yourtheme/woocommerce/myaccount/view-delivery.php`

### Available Action Hooks

    // Admin - After delivery metabox content
    do_action( 'dman_admin_after_order_meta_box', $order );

    // Frontend - Before delivery timeline
    do_action( 'dman_before_delivery_timeline', $order );

    // My Account - Before deliveries list
    do_action( 'dman_before_account_deliveries', $has_deliveries );

    // My Account - Before each delivery column
    do_action( 'dman_my_account_deliveries_before_column_' . $column_id, $delivery_order );

    // Settings - After general settings fields
    do_action( 'dman_after_general_settings_fields' );

### Available Filter Hooks

    // Modify screen IDs
    apply_filters( 'dman_screen_ids', $screen_ids );

    // Customize deliveries table columns
    apply_filters( 'dman_account_deliveries_columns', $columns );

    // Modify deliveries query
    apply_filters( 'dman_my_account_my_deliveries_query', $args );


### Plugin Constants

    DMAN_VERSION       // Plugin version number
    DMAN_FILE          // Main plugin file path
    DMAN_PATH          // Plugin directory path
    DMAN_URL           // Plugin directory URL
    DMAN_ASSETS_PATH   // Assets directory path
    DMAN_ASSETS_URL    // Assets directory URL

### Helper Functions

    // Get plugin instance
    delivery_manager_for_woocommerce();

    // Check if user is delivery person
    dman_is_delivery_person( $user_id );

    // Get deliveries table columns
    dman_get_account_deliveries_columns();

    // Get delivery view URL
    dman_get_delivery_view_url( $delivery_order );

    // Get delivery steps for timeline
    dman_get_delivery_steps( $order );

### Code Examples

**Add custom delivery column:**

    add_filter( 'dman_account_deliveries_columns', function( $columns ) {
        $columns['custom'] = 'Custom Column';
        return $columns;
    });

**Add custom content after metabox:**

    add_action( 'dman_admin_after_order_meta_box', function( $order ) {
        echo '<p>Custom content here</p>';
    });

== Support & Feedback ==

We're committed to providing excellent support and continuously improving the Delivery Manager for WooCommerce.

**Get Help:**
* Visit our website: [BeautifulPlugins.com](https://beautifulplugins.com/plugins/delivery-manager-pro/)
* Contact support: [Support Page](https://beautifulplugins.com/support/)
* Check documentation for guides and tutorials

**Report Issues:**
* Found a bug? Let us know so we can fix it
* Have a feature request? We'd love to hear your ideas
* Experiencing compatibility issues? We'll work to resolve them

**Leave a Review:**
If you find Delivery Manager for WooCommerce helpful, please consider leaving a review on WordPress.org. Your feedback helps us improve and helps others find the plugin.
[**Write a review**](https://wordpress.org/support/plugin/delivery-manager-for-woocommerce/reviews/#new-post)

== Credits ==

**Developed By:** [BeautifulPlugins](https://beautifulplugins.com/)

**Special Thanks:**
* The WordPress community for inspiration and support
* WooCommerce team for their excellent e-commerce platform
* All users who provide valuable feedback and suggestions

**Contributing:**
Delivery Manager for WooCommerce is developed with care and attention to quality. We welcome feedback, bug reports, and feature suggestions from our community.



