Building a Live Order Tracking Plugin for WooCommerce
For my BCIT Front-End Web Developer capstone project, our team built an online ordering system for a local restaurant. While most of the team focused on design and front-end features, I kept thinking about what happens after checkout—specifically, what the experience looks like in the kitchen and for customers waiting for their food. That's when I decided to build a custom live order tracking plugin.
The Problem: Disconnected Experiences
We were using WooCommerce because it's the best e-commerce solution for WordPress, combined with a plugin called Orderable that streamlines restaurant ordering. Orderable already provided the kitchen with a live order management interface—they could see orders come in and update their status in real-time. But there was a gap on the customer side: after checkout, customers had no visibility into their order progress. I wanted to bridge that gap by extending Orderable's functionality to give customers the same real-time visibility that kitchen staff already had.
The Solution: Extending Orderable with Live Tracking
I built a custom WordPress plugin that extends Orderable's functionality to create a live order status screen. Here's how it works:
How It Works
- →Customer places a delivery order through WooCommerce/Orderable
- →System generates a unique access key tied to their order
- →Customer receives an email with a link containing their key
- →The link opens a live status page showing real-time order progress
- →Kitchen staff updates order status from Orderable's backend
- →JavaScript polls the database and updates the customer's view instantly
- →Once marked 'Delivered', the key expires within 20 seconds for security
Technical Implementation
The plugin hooks into WooCommerce's order lifecycle using action hooks like 'woocommerce_checkout_create_order' and 'woocommerce_order_status_changed'. When an order is created, the plugin generates a UUID v4 access key, hashes it using PHP's password_hash() function, and stores the hash in post meta with the key '_tracking_uuid'. The unhashed UUID is sent to the customer via email with a tracking link.
The tracking page uses a custom WordPress AJAX endpoint ('get_order_status_update') that verifies the magic key using password_verify() before returning order data. The endpoint translates WooCommerce status codes—'processing' becomes 'Being Prepared', 'on-hold' becomes 'Out For Delivery', 'completed' becomes 'Delivered'. JavaScript on the frontend polls this endpoint to update the page without refreshing, creating that real-time feel.
Security was critical. The password hashing ensures that even database access doesn't reveal valid tracking keys. When an order status changes to 'completed', the plugin uses wp_schedule_single_event() to set a delayed revocation—exactly 20 seconds later, it marks the key as revoked by setting '_tracking_uuid_revoked' in post meta. The AJAX endpoint checks for this flag and blocks access once revoked. The plugin also filters orders to only track delivery orders, excluding pickup orders entirely.
Email System and Template Loading
The plugin sends branded HTML emails using WordPress's wp_mail() function with custom headers for proper formatting. The email template pulls the site logo using get_theme_mod('custom_logo') and generates a clean, centered design with a prominent call-to-action button linking to the tracking page. The tracking URL includes the unhashed UUID as a query parameter.
For the tracking page itself, I created a custom page template that's loaded via the 'template_include' filter. The plugin automatically creates an 'order-tracking' page on activation using wp_insert_post(), and registers rewrite rules to handle the URL routing. This approach keeps the tracking interface completely separate from the theme, making it portable across different WordPress installations.
What I Learned About WordPress Architecture
This project gave me deep hands-on experience with WordPress's post meta system. WooCommerce orders are stored as custom post types, and I used order meta methods like $order->update_meta_data() and $order->get_meta() to attach tracking data directly to each order. The plugin stores two key pieces of metadata: '_tracking_uuid' (the hashed access key) and '_tracking_uuid_revoked' (a boolean flag indicating if the key has expired). Understanding how to properly query and manipulate post meta was essential to making this plugin work seamlessly with WooCommerce's existing architecture.
The Planning Process
Before writing any code, I created the complete information architecture (IA) for the site, mapping out checkout flows, order status transitions, and user journeys. This planning phase taught me that the more complex and impactful a feature is, the more critical upfront planning becomes. Plugins that integrate with existing systems need clear architecture documentation to avoid conflicts and ensure maintainability.
Planning Deliverables I Created
- →Complete site information architecture
- →Checkout flow diagrams
- →Order status state transitions
- →User journey maps for customers and kitchen staff
- →Security requirements documentation
- →Integration points with WooCommerce and Orderable
Technology as an Extension of Itself
This project crystallized something important for me: technology builds on technology. I wasn't starting from scratch—I was extending WooCommerce, which extends WordPress, which builds on PHP and MySQL. Each layer adds capabilities that make the next innovation possible. The Orderable plugin gave us restaurant-specific ordering features, and I built on top of that to add real-time customer communication. That's how progress happens—incremental improvements that open new possibilities.
Even something as seemingly simple as long polling for live updates felt revolutionary in context. It's not bleeding-edge technology, but applied thoughtfully, it creates an experience that feels magical to users. That's what good development is about: using the right tools to solve real problems in ways that feel effortless.
Kitchen-First Design Thinking
The key insight that drove this entire plugin was thinking about the kitchen experience. Orderable already provided restaurant staff with an excellent live order management interface—they could see orders come in, update status, and manage their workflow efficiently. My plugin didn't need to reinvent that. Instead, I hooked into Orderable's existing backend to pull status updates and translate them for customers. Kitchen staff continue using the same system they're already comfortable with, while customers now get automatic real-time visibility into their order progress.
This is the kind of thinking that makes custom plugins valuable: understanding the complete user journey, identifying what's already working well (Orderable's kitchen interface), and extending it to serve additional stakeholders (customers) without disrupting existing workflows.
Key Takeaways
- →Custom plugins shine when they solve specific, real-world problems
- →WordPress action hooks like 'woocommerce_checkout_create_order' enable deep WooCommerce integrations
- →Password hashing with password_hash() and password_verify() provides secure key verification
- →wp_schedule_single_event() enables delayed actions like automatic key revocation
- →Custom AJAX endpoints with wp_ajax actions create real-time updates without page refreshes
- →Order meta methods ($order->update_meta_data(), $order->get_meta()) are the proper way to extend WooCommerce orders
- →Good planning—IA, flow diagrams, journey maps—makes complex features possible
- →The best solutions extend existing tools rather than replace them
- →Think beyond the customer: consider everyone who interacts with the system
Looking Back
This capstone project taught me more than any tutorial could. It forced me to think architecturally, to consider security from the start, to plan thoroughly before coding, and to understand how WordPress plugins integrate with existing ecosystems. Most importantly, it showed me that building custom solutions isn't about reinventing the wheel—it's about extending what exists in ways that create genuine value for real users.
The moment a customer clicks that email link and sees their order moving through the kitchen in real-time? That's what makes development worthwhile.
About the Author
Warren Chemerika is a web developer based in West Vancouver, BC, specializing in WordPress, React, and custom web solutions. Available for freelance projects and consulting.
Get in Touch