Click & Collect
A comprehensive Click & Collect plugin with radius search and time-slot booking for WooCommerce.
by H M Shahadul Islam · github.com/shahadul878/click-and-collect · website
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/shahadul878/click-and-collect/archive/refs/heads/master.zipClick & Collect Plugin for WooCommerce
A comprehensive Click & Collect plugin with radius search and time-slot booking for WooCommerce stores.
Features
🚀 Core Features
- Radius Search: Find pickup points within a specified distance
- Time-slot Booking: Book specific collection time slots
- Google Maps Integration: Geocoding and distance calculations
- Geolocation Support: Use customer's current location
- Branch Management: Easy branch setup and management
- Order Integration: Seamless WooCommerce checkout integration
💼 Admin Features
- Branch Management: Create and manage pickup locations
- Time Slot Configuration: Set working hours and capacity per branch
- Order Management: View pickup details in order admin
- Dashboard Analytics: Track pickup performance and statistics
- Email Integration: Automatic pickup confirmations and reminders
🛒 Customer Experience
- Easy Selection: Intuitive pickup point selection modal
- Real-time Availability: Live time slot availability
- Distance Display: Shows distance from customer location
- Mobile Responsive: Works perfectly on all devices
- Multiple Payment Methods: Supports various payment options
Installation
- Upload the plugin files to
/wp-content/plugins/click-and-collect/ - Activate the plugin through the 'Plugins' screen in WordPress
- Configure your Google Maps API key in the settings
- Create your first branch under "Branches" in the admin menu
Configuration
Google Maps API Key
- Go to Google Cloud Console
- Create a new project or select an existing one
- Enable the following APIs:
- Geocoding API
- Maps JavaScript API
- Distance Matrix API
- Create an API key
- Add the API key in Click & Collect settings
Branch Setup
- Go to "Click & Collect" > "Branches"
- Click "Add New Branch"
- Fill in branch details:
- Name and address
- Contact information
- Working hours
- Capacity per time slot
- Slot duration
Payment Method Setup
- Go to WooCommerce > Settings > Payments
- Enable "Cash on Collection" payment method
- Configure the payment method settings
Usage
For Customers
- Add products to cart and proceed to checkout
- Select "Cash on Collection" as payment method
- Click "Select Pickup Point"
- Enter postal code or use current location
- Choose a branch from the list
- Select an available time slot
- Complete the order
For Store Owners
- Manage Branches: Add, edit, or deactivate pickup locations
- Monitor Orders: View pickup details in order management
- Track Performance: Use dashboard analytics to monitor usage
- Customize Settings: Configure search radius, time slots, and more
Technical Details
System Requirements
- WordPress 5.0 or higher
- WooCommerce 5.0 or higher
- PHP 7.4 or higher
- MySQL 5.6 or higher
WooCommerce Compatibility
- ✅ HPOS Compatible: Fully supports WooCommerce High-Performance Order Storage (HPOS)
- ✅ Traditional Orders: Works with both traditional post-based orders and custom order tables
- ✅ Future-Proof: Automatically adapts to WooCommerce's order storage system
Database Tables
The plugin creates the following custom table:
wp_click_collect_bookings: Stores time slot bookings
Hooks and Filters
The plugin provides various hooks for customization:
Actions
click_collect_before_pickup_selection: Before pickup point selectionclick_collect_after_pickup_selection: After pickup point selectionclick_collect_order_pickup_booked: When pickup is bookedclick_collect_pickup_reminder_sent: When pickup reminder is sent
Filters
click_collect_branches_query: Modify branch search queryclick_collect_timeslot_display: Customize time slot displayclick_collect_pickup_confirmation_email: Modify confirmation emailclick_collect_search_radius: Modify default search radius
Customization
Styling
Override plugin styles by adding custom CSS to your theme:
/* Customize pickup point selection modal */
.click-collect-modal {
/* Your custom styles */
}
/* Customize branch list */
.branch-item {
/* Your custom styles */
}
JavaScript
Extend plugin functionality with custom JavaScript:
// Listen for pickup selection events
jQuery(document).on('click_collect_pickup_selected', function(event, data) {
// Your custom code
console.log('Pickup selected:', data);
});
API Reference
AJAX Endpoints
click_collect_search_branches: Search for branches within radiusclick_collect_get_timeslots: Get available time slots for a branchclick_collect_validate_pickup: Validate pickup selectionclick_collect_get_user_location: Get user's current location
REST API Endpoints
GET /wp-json/click-collect/v1/branches: Get all branchesGET /wp-json/click-collect/v1/branches/{id}: Get specific branchGET /wp-json/click-collect/v1/orders/{id}/pickup: Get pickup details for order
Troubleshooting
Common Issues
Google Maps Not Loading
- Verify your API key is correct
- Check that required APIs are enabled
- Ensure API key has proper restrictions
No Branches Found
- Check that branches are set to "Active" status
- Verify branch coordinates are set
- Check search radius settings
Time Slots Not Available
- Verify working hours are configured
- Check that branch capacity is set
- Ensure date is not in the past
Debug Mode
Enable debug mode by adding this to your wp-config.php:
define('CLICK_COLLECT_DEBUG', true);
This will log additional information to help troubleshoot issues.
Support
For support and feature requests, please visit the GitHub repository or contact the developer.
Changelog
Version 1.0.1
- ✅ HPOS Compatibility: Added full support for WooCommerce High-Performance Order Storage
- ✅ Database Queries: Updated all order queries to work with both traditional and HPOS systems
- ✅ Future-Proof: Plugin automatically adapts to WooCommerce's order storage system
Version 1.0.0
- Initial release
- Branch management system
- Time slot booking
- Google Maps integration
- WooCommerce checkout integration
- Admin dashboard and analytics
- Email notifications
- Mobile responsive design
License
This plugin is licensed under the GPL v2 or later.
Credits
- Author: H M Shahadul Islam
- Author URI: https://github.com/shahadul878
- Plugin URI: https://github.com/shahadul878/click-and-collect
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Roadmap
Upcoming Features
- [ ] Multi-language support
- [ ] SMS notifications
- [ ] Advanced reporting
- [ ] Integration with popular delivery plugins
- [ ] Mobile app support
- [ ] Customer pickup history
- [ ] Branch performance analytics
- [ ] Automated reminder system