A comprehensive WordPress plugin for logistics services, providing secure frontend logistics platform with KYC-gated SHIP FOR ME & BUY FOR ME workflows.
- Ship For Me: Send packages from US warehouses to Nigeria
- Buy For Me: Purchase items in the US and ship to Nigeria
- KYC Verification: Secure customer verification system
- Payment Integration: Paystack and Flutterwave support
- Admin Dashboard: Complete management interface
- PDF Invoicing: Professional invoice generation
- WhatsApp Notifications: Automated customer notifications
- Audit Logging: Complete activity tracking
- GDPR Compliance: Data protection features
- WordPress 6.4+
- PHP 7.4+
- MySQL 5.6+
- Composer (for dependency management)
- Download the plugin zip file
- Extract to
wp-content/plugins/zephora-logistics/ - Install dependencies:
composer install - Activate the plugin through WordPress admin
- Configure settings in Zephora Logistics > Settings
composer require zephora/logisticsWhen the plugin is activated, it will automatically:
-
Create necessary directories:
wp-content/uploads/zls-invoices/- PDF invoiceswp-content/uploads/zls-kyc-documents/- KYC uploadswp-content/zls-logs/- Error and audit logs
-
Create essential pages:
- My Dashboard (
/my-dashboard/) - User dashboard with [zls_dashboard] shortcode - KYC Verification (
/kyc-verification/) - KYC verification page - Ship For Me (
/ship-for-me/) - Shipping request form with [zls_ship_for_me] shortcode - Buy For Me (
/buy-for-me/) - Purchase request form with [zls_buy_for_me] shortcode - Login (
/login/) - Custom login page (redirects to WordPress login)
- My Dashboard (
-
Set default configuration options
-
Create a default US warehouse address
-
Register custom post types
-
Log the activation event
- Pages are created only if they don't already exist
- Existing pages with the same slugs will not be overwritten
- You can customize page content and settings after activation
- All pages are created as published with comments disabled
- Go to WordPress Admin > Zephora Logistics > Settings
- Configure general settings:
- Enable/disable payment gateways
- Enable WhatsApp notifications
- Set default tax rates
- Get API keys from Paystack Dashboard
- Enter Public and Secret keys in Settings > API Keys
- Set webhook URL:
https://yoursite.com/wp-admin/admin-ajax.php?action=zls_webhook_paystack
- Get API keys from Flutterwave Dashboard
- Enter Public and Secret keys in Settings > API Keys
- Set webhook URL:
https://yoursite.com/wp-admin/admin-ajax.php?action=zls_webhook_flutterwave
- Sign up for Termii
- Get API key and sender ID
- Enter credentials in Settings > API Keys
- Enable WhatsApp notifications in General settings
The plugin automatically fetches current USD to NGN exchange rates using multiple APIs:
Automatic Rate Updates:
- Rates are cached for 1 hour to minimize API calls
- Daily scheduled updates ensure fresh rates
- Falls back to hardcoded rate (1500) if all APIs fail
API Options (in priority order):
- Open Exchange Rates (requires API key)
- exchangerate-api.com (requires API key)
- Free tier API (no key required)
Manual Rate Setting:
- Go to Settings > General
- Enter a manual USD to NGN rate
- This rate will be used instead of fetching from APIs
- Leave blank to use automatic rate fetching
- Go to Settings > US Addresses
- Add multiple warehouse locations
- Mark addresses as active/inactive
- Include contact information for each location
- User registers on your site
- Completes KYC verification form
- Admin reviews and approves KYC
- User gains access to logistics services
- User logs into dashboard
- Fills out shipping form with package details
- Selects US warehouse address
- Provides recipient information
- Submits and pays for service
- User provides product details and budget
- System calculates estimated costs
- User approves quote and pays
- Zephora team purchases and ships item
- View all ship/buy requests in admin dashboard
- Update request statuses
- Generate and send quotes
- Process payments
- Track shipments
- Review pending KYC applications
- Approve or deny applications
- View submitted documents
- Manage user access
- Configure payment gateways
- Manage warehouse addresses
- Set pricing and tax rates
- Configure notifications
The plugin provides the following shortcodes for displaying forms and content:
[zls_dashboard]- User dashboard (shows on My Dashboard page)[zls_ship_for_me]- Ship For Me request form (shows on Ship For Me page)[zls_buy_for_me]- Buy For Me request form (shows on Buy For Me page)
// Add to any page or post
[zls_dashboard]
[zls_ship_for_me]
[zls_buy_for_me]Admins can perform bulk actions on multiple requests from the Ship/Buy requests list:
- Approve & Send Quote - Send quotes to multiple customers
- Mark as Paid - Bulk update status to paid
- Mark as Shipped - Bulk update status to shipped
- Mark as Delivered - Bulk update status to delivered
- Send Notification - Send status notifications to multiple customers
How to Use:
- Go to Zephora Logistics > Ship Requests or Buy Requests
- Select multiple requests using checkboxes
- Choose action from the "Bulk Actions" dropdown
- Click "Apply"
Generate comprehensive reports and export data:
Export Options:
- Export Requests - Download all requests as CSV or Excel
- Export Analytics - Generate detailed reports as CSV or PDF
Report Types:
- Summary report with totals and statistics
- Revenue breakdown by status
- Revenue breakdown by request type
- Top customers analysis
- Daily breakdown analytics
Filter Options:
- Date range (from/to)
- Request status
- Request type (Ship For Me/Buy For Me)
How to Export:
- Go to Zephora Logistics > Dashboard
- Use the export tools in the admin panel
- Select filters and format (CSV/PDF)
- Download generated file
wp_ajax_download_zls_invoice- Download PDF invoiceswp_ajax_fetch_shipment_details- Get shipment informationwp_ajax_zls_delete_request- Delete pending requestswp_ajax_load_recent_activity- Load paginated activitywp_ajax_confirm_payment- Confirm manual paymentswp_ajax_zls_update_rates- Manually update exchange rates (admin only)wp_ajax_zls_export_requests- Export requests to CSV/Excel (admin only)wp_ajax_zls_export_report- Export analytics reports (admin only)
wp_ajax_nopriv_zls_webhook_paystack- Paystack payment webhookswp_ajax_nopriv_zls_webhook_flutterwave- Flutterwave payment webhooks
zephora-logistics/
├── zephora-logistics.php # Main plugin file
├── composer.json # Dependencies
├── README.md # This file
├── assets/
│ ├── css/
│ │ ├── admin.css # Admin styles
│ │ ├── frontend.css # Frontend styles
│ │ └── kyc-frontend.css # KYC form styles
│ └── js/
│ ├── admin.js # Admin scripts
│ ├── frontend.js # Frontend scripts
│ └── settings.js # Settings scripts
├── includes/
│ ├── class-core.php # Core functionality
│ ├── class-dashboard.php # User dashboard
│ ├── class-ship-for-me.php # Ship For Me handler
│ ├── class-buy-for-me.php # Buy For Me handler
│ ├── class-kyc-manager.php # KYC management
│ ├── class-payments.php # Payment processing
│ ├── class-pdf.php # PDF generation
│ ├── class-notifications.php # Notifications
│ ├── class-currency-converter.php # Exchange rate conversion
│ ├── class-bulk-operations.php # Bulk admin actions
│ ├── class-export-manager.php # Reports and exports
│ ├── class-audit-logger.php # Audit logging
│ ├── class-admin-ui.php # Admin interface
│ ├── class-settings.php # Settings management
│ ├── class-security.php # Security features
│ ├── class-gdpr.php # GDPR compliance
│ └── class-post-types.php # Custom post types
├── templates/
│ └── pdf-invoice.php # Invoice template
└── languages/
└── zls-en_US.mo # Translation files
This plugin requires the following PHP packages (managed via Composer):
dompdf/dompdf: PDF generationpsr/log: Logging interface (optional)
Install with:
composer installThe plugin includes comprehensive error handling and logging:
- Error Handler: Catches PHP errors, exceptions, and fatal errors
- Application Logging: Logs application-specific errors and events
- Audit Logging: Tracks all user actions and system events
- Log Files: Located in
wp-content/zls-logs/ - Admin Access: Error logs can be viewed in admin for debugging
- All forms include nonce verification
- Input sanitization and validation
- User capability checks
- Secure file uploads for KYC documents
- Audit logging for all actions
- GDPR compliance features
- Comprehensive error handling prevents information leakage
// Get current USD to NGN rate
$rate = ZLS_Currency_Converter::get_usd_to_ngn();
// Convert USD to NGN
$ngn_amount = ZLS_Currency_Converter::convert_usd_to_ngn(100); // Returns ₦150,000
// Convert NGN to USD
$usd_amount = ZLS_Currency_Converter::convert_ngn_to_usd(150000); // Returns 100
// Get rate history
$history = ZLS_Currency_Converter::get_rate_history(30); // Last 30 rates// Get bulk actions summary for multiple requests
$post_ids = array(123, 124, 125);
$summary = ZLS_Bulk_Operations::get_bulk_actions_summary($post_ids);
// Returns: total_requests, total_value_usd, total_value_ngn, status_counts, type_counts// Generate analytics report programmatically
$report = ZLS_Export_Manager::generate_report('summary', 30); // last 30 days
// Returns comprehensive analytics data
// Prepare data for export
$posts = get_posts(array('post_type' => array('zls_ship', 'zls_buy'), 'numberposts' => -1));
$export_data = self::prepare_export_data($posts);- Initial release
- Ship For Me and Buy For Me workflows
- KYC verification system
- Payment gateway integration
- PDF invoice generation
- WhatsApp notifications
- Admin management interface
New Features:
- Automated Currency Conversion - Real-time USD to NGN exchange rates with multiple API providers
- Bulk Operations - Approve, update, and notify multiple requests at once
- Export & Analytics - Generate detailed reports and export data to CSV/PDF
- Enhanced Error Handling - Comprehensive logging and debugging system
- Automatic Page Creation - Essential pages auto-created on activation
Improvements:
- Proper activation/deactivation hooks
- Directory auto-creation on activation
- Default configuration setup
- Enhanced security and error handling
For support, please contact:
- Email: support@zephora.logistics
- Website: https://zephora.logistics
GPL-3.0-only - See LICENSE file for details
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
Developed by Zephora Engineering