WP Manifestindependent plugin directory
manifest / ecommerce / woocommerce-order-tracker-lite

WooCommerce Order Tracker Lite

Lightweight WooCommerce order tracking widget with secure customer lookup, shipment tracking fields, order status progress, and HPOS support.

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/amirrezashf/woocommerce-order-tracker-lite/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

A lightweight, standalone WooCommerce order-tracking plugin that gives customers a convenient frontend interface for checking an order's current status and shipment information without exposing arbitrary order data.

The plugin adds a floating Track order button and accessible modal to the storefront. Logged-in customers can look up orders they own, while guests must provide the order identifier together with the matching billing email.

Features

  • Floating frontend order-tracking button
  • Accessible modal-based tracking interface
  • Logged-in customer ownership verification
  • Guest verification using billing email
  • Current WooCommerce order status
  • Visual order-status progress
  • Shipment/tracking fields managed from the WooCommerce order editor
  • Carrier/tracking information in the customer result when available
  • WooCommerce HPOS compatibility
  • WooCommerce CRUD for order data
  • AJAX lookup with nonce validation
  • Lightweight request throttling/rate limiting
  • Responsive frontend UI
  • aria-live result feedback
  • No public exposure of complete order details
  • No custom analytics database
  • No site-specific domain, theme, or branding

Requirements

  • WordPress 6.0+
  • PHP 7.4+
  • WooCommerce

Installation

  1. Download the installable ZIP.
  2. In WordPress admin, go to Plugins → Add New → Upload Plugin.
  3. Upload WooCommerce-Order-Tracker-Lite.zip.
  4. Install and activate the plugin.
  5. Open the storefront.
  6. Use the floating Track order button to open the tracking interface.
  7. Add shipment/tracking information to WooCommerce orders from the order administration screen when needed.

Customer Tracking Flow

The plugin renders a floating tracking control on supported frontend pages.

When opened, the modal asks for an order identifier. Guests are additionally required to enter the order's billing email. The implementation explicitly renders an Order number field and conditionally renders Billing email only for logged-out visitors.

After submission, the server verifies the request before returning the order status/tracking result.

Logged-In Customers

For authenticated users, simply knowing an order ID must not grant access to another customer's order.

The plugin verifies that the requested order belongs to the current customer before returning protected order information.

This means a logged-in customer cannot use the public tracker as an arbitrary order-enumeration endpoint.

Guest Customers

Guests do not have a WordPress account identity that can be matched to an order owner.

For that reason, the tracker requires both:

  • the order identifier;
  • the matching billing email.

The email acts as the secondary ownership/knowledge check for guest lookup.

The plugin intentionally does not rely on phone-number-only lookup.

Security Model

Order tracking is a public-facing feature, so authorization and data minimization are important.

The plugin is designed around the following principles:

  • AJAX requests require the expected nonce;
  • order identifiers are normalized before use;
  • logged-in users must own the requested order;
  • guests must provide the matching billing email;
  • responses contain only the information needed for tracking;
  • frontend input is not trusted as proof of authorization;
  • request throttling reduces trivial high-frequency lookup attempts;
  • order information is read through WooCommerce APIs.

The tracker should not be treated as an administrative order viewer.

Order Status Result

The result includes the order number and a human-readable representation of the current order state.

The plugin also builds a progress representation and clamps the calculated progress value between 0 and 100 before rendering it.

This provides customers with a simpler visual representation than exposing WooCommerce's internal order object or raw metadata.

Shipment / Tracking Information

The plugin supports shipment information associated with the WooCommerce order.

When tracking information exists, it can be included in the customer-facing result alongside the order's current progress.

Shipment data is intended for operational fields such as a carrier/shipping provider, tracking code, and tracking URL where configured by the plugin.

The order editor is the administrative source of these values; customers cannot write shipment data through the public tracker.

HPOS Compatibility

The plugin is intended to work with WooCommerce High-Performance Order Storage.

Order information is accessed through WC_Order/WooCommerce APIs rather than treating an order as an ordinary WordPress post.

This keeps the tracking workflow compatible with stores using HPOS as well as the legacy WooCommerce order editor where supported.

AJAX

The tracking lookup is asynchronous so the visitor can check an order without navigating away from the current page.

The response container uses aria-live="polite" so asynchronous status feedback can be announced by assistive technology.

AJAX is only a transport mechanism. Authorization remains server-side.

Rate Limiting

Public order lookup endpoints can be abused by automated clients.

The plugin therefore includes lightweight throttling/rate limiting around tracking requests.

This is intended to reduce trivial repeated requests and unnecessary server load.

It is not a replacement for infrastructure-level abuse protection, WAF rules, CDN rate limits, or bot protection on high-risk/high-traffic stores.

Accessibility

The frontend tracker is structured as a modal dialog.

The rendered markup includes:

  • a real button to open the tracker;
  • aria-haspopup="dialog";
  • aria-controls;
  • role="dialog";
  • aria-modal="true";
  • an accessible close-button label;
  • associated form labels;
  • aria-live="polite" for asynchronous results.

The UI is intended to remain keyboard-usable and responsive rather than being a mouse-only visual overlay.

Privacy

The tracker intentionally exposes a limited customer-facing status result rather than returning the complete WooCommerce order object.

For guest lookup, billing email is used to verify the request.

Site operators should still treat order identifiers, email addresses, shipment identifiers, and tracking information as customer/order data.

The plugin does not need to create a separate copy of the customer's complete order history.

Performance

The plugin is designed as a per-order lookup tool.

It does not need to scan or load the complete order database to answer a tracking request.

Key performance characteristics include:

  • lookup of one requested order;
  • WooCommerce API access;
  • no global order-history scan;
  • no large analytics query;
  • frontend assets loaded only where the tracker is rendered;
  • lightweight rate limiting for repeated requests.

For very high-traffic stores, public lookup traffic should still be protected at the infrastructure/CDN/WAF level.

Internationalization

Frontend strings use the plugin text domain and WordPress translation functions. For example, the tracker title, order field, billing-email field, submit action, and close label are rendered through translation/escaping functions.

This allows the public UI to be translated without hardcoding a specific store language into the architecture.

Important Order Number Limitation

The frontend field is labelled Order number, but integrations should distinguish between a WooCommerce internal order ID and a custom/sequential display number.

If the installed version resolves the submitted value through wc_get_order( absint( ... ) ), stores using a separate sequential/custom order-number plugin may need an integration layer that translates the displayed order number to the real WooCommerce order ID.

Do not assume compatibility with every third-party sequential-order-number plugin unless explicitly tested.

Troubleshooting

The order is not found

Check:

  1. the submitted order identifier is correct;
  2. the order still exists;
  3. the customer is using the correct billing email when logged out;
  4. the logged-in account actually owns the order;
  5. a custom sequential-order-number plugin is not changing the displayed order number.

Guest lookup is rejected

Verify that the entered email matches the order's billing email.

Do not replace email verification with a weaker phone-only lookup unless the security model is deliberately redesigned.

Tracking information is missing

Verify that shipment/tracking information has been saved on the order.

The order can still have a valid WooCommerce status even when no carrier tracking code has been assigned.

The floating tracker is not visible

Check for:

  • theme/plugin CSS conflicts;
  • JavaScript errors from other extensions;
  • page-level conditions controlling where the widget renders;
  • aggressive optimization/minification that changes inline asset execution.

What the Plugin Does Not Do

The plugin does not:

  • provide administrative access to an order;
  • expose complete billing/payment/order details publicly;
  • allow a guest to look up an order using only a phone number;
  • replace a carrier's tracking service;
  • guarantee third-party tracking URL availability;
  • provide a complete shipment-management platform;
  • scan all orders to find a match from arbitrary customer information;
  • guarantee compatibility with every custom/sequential order-number plugin;
  • replace infrastructure-level bot/rate-limit protection.

Limitations

  • Guest tracking requires the matching billing email.
  • Logged-in lookup is restricted to the current customer's order.
  • Carrier tracking quality depends on the shipment information entered by store staff.
  • External tracking URLs/providers remain outside the plugin's control.
  • Custom order-number systems may require integration if their public number differs from the WooCommerce order ID.
  • The plugin is a lightweight tracker, not a full logistics/fulfillment suite.

Suggested GitHub Description

Lightweight WooCommerce order tracking widget with secure customer lookup, shipment tracking fields, order status progress, and HPOS support.

License

GPL-3.0

Author

Amirreza Shayesteh Far

GitHub: https://github.com/amirrezashf


رهگیری سفارش ووکامرس

WooCommerce Order Tracker Lite یک افزونه سبک و مستقل برای WooCommerce است که به مشتری اجازه می‌دهد بدون ورود به صفحه مدیریت یا مشاهده اطلاعات حساس سفارش، وضعیت فعلی سفارش و اطلاعات رهگیری مرسوله را بررسی کند.

افزونه در Frontend یک دکمه شناور Track order نمایش می‌دهد که یک Modal رهگیری را باز می‌کند. در کد فعلی، کاربر باید شماره سفارش را وارد کند و اگر Login نباشد، فیلد Billing email نیز برای او نمایش داده می‌شود.

قابلیت‌ها

  • دکمه شناور رهگیری سفارش در Frontend
  • Modal مستقل برای بررسی وضعیت Order
  • بررسی مالکیت سفارش برای کاربران Loginشده
  • بررسی Billing Email برای کاربران Guest
  • عدم استفاده از Phone-only Lookup
  • نمایش وضعیت فعلی WooCommerce
  • نمایش Progress وضعیت سفارش
  • پشتیبانی از اطلاعات Shipment/Tracking
  • مدیریت اطلاعات رهگیری از Order Admin
  • نمایش اطلاعات رهگیری برای مشتری در صورت وجود
  • AJAX Lookup
  • Nonce Validation
  • Rate Limiting سبک برای درخواست‌های رهگیری
  • سازگاری با HPOS
  • استفاده از WooCommerce Order APIs
  • رابط Responsive
  • aria-live برای نتیجه Async
  • عدم نمایش کامل اطلاعات حساس Order
  • بدون Custom Analytics Table
  • بدون وابستگی به Domain، Theme یا Branding خاص

کاربرد افزونه

هدف این افزونه ایجاد یک راه ساده برای پاسخ به سؤال رایج مشتری است:

«سفارش من الان در چه وضعیتی است و اگر ارسال شده، کد رهگیری آن چیست؟»

به‌جای اینکه مشتری برای یک بررسی ساده حتماً وارد My Account شود یا با پشتیبانی تماس بگیرد، می‌تواند از Tracker استفاده کند.

در عین حال Tracker نباید تبدیل به راهی برای مشاهده Orderهای دیگران شود؛ به همین دلیل Lookup با کنترل مالکیت/Email انجام می‌شود.

نحوه استفاده مشتری

مشتری روی دکمه شناور رهگیری کلیک می‌کند.

Modal باز می‌شود و فیلد Order number نمایش داده می‌شود.

برای Guest، Billing Email نیز الزامی است. این رفتار مستقیماً در UI افزونه پیاده‌سازی شده است.

پس از Submit:

  1. درخواست به Server ارسال می‌شود.
  2. ورودی‌ها Normalize/Validate می‌شوند.
  3. Order مورد نظر Resolve می‌شود.
  4. مجوز مشاهده بررسی می‌شود.
  5. Status و Tracking Data مجاز استخراج می‌شوند.
  6. نتیجه محدود و Customer-facing برگردانده می‌شود.

کاربران Loginشده

اگر کاربر Login باشد، دانستن ID یا شماره یک سفارش نباید برای مشاهده Order کافی باشد.

افزونه بررسی می‌کند Order متعلق به Customer فعلی باشد.

این مسئله برای جلوگیری از IDOR / Order Enumeration اهمیت دارد.

برای مثال، اگر User شماره Order دیگری را حدس بزند، Tracker نباید اطلاعات آن را صرفاً به دلیل وجود Order نمایش دهد.

کاربران Guest

Guest دارای User ID قابل اتصال به Order نیست.

به همین دلیل برای Guest علاوه بر شناسه سفارش، Billing Email نیز درخواست می‌شود.

Email باید با Billing Email همان Order مطابقت داشته باشد.

این طراحی از Lookup صرفاً با شماره سفارش امن‌تر است.

چرا Phone-only Lookup وجود ندارد؟

شماره موبایل در بسیاری از فروشگاه‌ها ممکن است:

  • بین اعضای خانواده مشترک باشد؛
  • با فرمت‌های متفاوت ثبت شده باشد؛
  • در سیستم‌های دیگر قابل حدس/دسترسی باشد؛
  • برای چند سفارش استفاده شده باشد.

بنابراین نسخه عمومی افزونه Lookup را صرفاً بر اساس Phone انجام نمی‌دهد.

اگر در آینده Phone Lookup اضافه شود باید همراه با مدل Authorization مناسب طراحی شود، نه صرفاً یک Query روی Billing Phone.

اطلاعاتی که نمایش داده می‌شوند

Tracker برای مشتری اطلاعات عملیاتی لازم را نمایش می‌دهد، نه کل Order Object.

نتیجه شامل شماره Order و وضعیت قابل فهم سفارش است. کد همچنین Progress را بین 0 و 100 Clamp می‌کند تا مقدار خارج از محدوده وارد UI نشود.

در صورت وجود Shipment Data، اطلاعات رهگیری نیز به نتیجه اضافه می‌شوند.

Progress وضعیت سفارش

Statusهای داخلی WooCommerce همیشه برای مشتری بهترین UX را ایجاد نمی‌کنند.

Tracker یک Progress ساده‌تر برای نمایش مرحله سفارش تولید می‌کند.

هدف Progress این است که مشتری بتواند سریع متوجه شود Order در چه مرحله‌ای قرار دارد، بدون اینکه نیاز باشد ساختار داخلی WooCommerce را بشناسد.

Progress یک نمایش Customer-facing است و جایگزین Status واقعی Order در WooCommerce نمی‌شود.

اطلاعات Shipment و Tracking

افزونه امکان نگهداری اطلاعات رهگیری مربوط به Order را دارد.

این اطلاعات می‌توانند شامل موارد عملیاتی مانند:

  • شرکت/روش ارسال
  • Tracking Code
  • Tracking URL

باشند، بسته به فیلدهایی که نسخه افزونه ارائه می‌کند.

این اطلاعات توسط Staff/Administrator روی Order مدیریت می‌شوند.

مشتری از Public Tracker امکان تغییر Tracking Data را ندارد.

امنیت Lookup

Public Order Tracking از بخش‌هایی است که در صورت طراحی اشتباه می‌تواند اطلاعات مشتریان را افشا کند.

مدل افزونه بر این اصول استوار است:

  • درخواست AJAX باید معتبر باشد.
  • Order Identifier قبل از استفاده Normalize می‌شود.
  • Logged-in User باید مالک Order باشد.
  • Guest باید Billing Email صحیح را ارائه کند.
  • Client Input به‌تنهایی Authorization محسوب نمی‌شود.
  • Response فقط شامل اطلاعات لازم برای Tracking است.
  • Rate Limiting سبک برای کاهش درخواست‌های پرتکرار وجود دارد.
  • Order Data از APIهای WooCommerce خوانده می‌شود.

AJAX

Lookup بدون Reload صفحه انجام می‌شود.

در UI، Result Container دارای:

aria-live="polite"

است تا نتیجه درخواست Async برای Assistive Technology قابل اعلام باشد.

AJAX صرفاً Transport است؛ تصمیم Authorization در Server انجام می‌شود.

Rate Limiting

چون Endpoint رهگیری در Frontend قابل دسترس است، Bot می‌تواند تلاش کند تعداد زیادی Order Identifier را امتحان کند.

افزونه Rate Limiting سبک دارد تا:

  • Requestهای تکراری کاهش پیدا کنند؛
  • فشار غیرضروری روی PHP/WooCommerce کمتر شود؛
  • Enumeration ساده دشوارتر شود.

اما این Rate Limit جایگزین ابزارهای Infrastructure نیست.

برای فروشگاه پرترافیک یا سایتی که هدف Abuse قرار گرفته بهتر است در کنار آن از مواردی مانند:

  • CDN
  • WAF
  • Bot Protection
  • Infrastructure Rate Limiting

نیز استفاده شود.

Accessibility

Tracker فقط یک div نمایشی نیست.

Markup فعلی شامل موارد Accessibility مهم است:

  • Button واقعی برای بازکردن Tracker
  • aria-haspopup="dialog"
  • aria-controls
  • role="dialog"
  • aria-modal="true"
  • Label برای Close Button
  • Label برای Form Fields
  • aria-live="polite" برای Result

این موارد در ساختار فعلی UI قابل مشاهده‌اند.

هدف این است که Modal با Keyboard و Screen Reader نیز قابل استفاده باشد.

HPOS

افزونه برای WooCommerce High-Performance Order Storage طراحی شده است.

Order باید از طریق WooCommerce APIs و WC_Order مدیریت شود و Logic اصلی نباید فرض کند Order همیشه یک WP_Post است.

این موضوع باعث می‌شود Tracker برای Storeهایی که HPOS را فعال کرده‌اند قابل استفاده باشد.

حریم خصوصی

برای Guest Verification از Billing Email موجود Order استفاده می‌شود.

Tracker نباید اطلاعات کامل Order را به Public Response ارسال کند.

اطلاعاتی مثل موارد زیر نباید صرفاً برای رهگیری ساده بدون ضرورت نمایش داده شوند:

  • Payment Details
  • Billing Address کامل
  • Customer Note خصوصی
  • اطلاعات سایر Orders
  • Admin Metadata

Order Number، Status و Shipment Tracking نیز همچنان Customer Data محسوب می‌شوند و باید با کنترل دسترسی مناسب ارائه شوند.

Performance

Tracker برای Lookup یک Order مشخص طراحی شده است.

در حالت عادی نیازی به:

  • Scan تمام Orders
  • Load کردن History کامل Customer
  • Query Analytics سراسری
  • Loop روی تعداد زیادی WC_Order

وجود ندارد.

Assets نیز زمانی Load می‌شوند که Widget واقعاً Render شود؛ در کد فعلی enqueue_now() در مسیر Render Widget فراخوانی می‌شود.

Internationalization

رشته‌های اصلی Frontend با Translation Functions وردپرس Render می‌شوند.

برای مثال:

  • Track order
  • Check order status
  • Track your order
  • Order number
  • Billing email
  • Check status
  • Close

در کد با توابع Translation/Escaping استفاده شده‌اند.

بنابراین معماری UI به یک زبان ثابت وابسته نیست.

نکته مهم درباره Order Number

در UI عبارت Order number نمایش داده می‌شود.

اما باید بین این دو مفهوم تفاوت قائل شد:

  1. WooCommerce Internal Order ID
  2. Display/Sequential Order Number

اگر فروشگاه از Plugin دیگری برای Sequential Order Number استفاده کند و عددی که مشتری می‌بیند با ID واقعی WooCommerce متفاوت باشد، ممکن است Integration جداگانه لازم باشد.

بنابراین سازگاری با تمام Sequential Order Number Pluginها بدون تست صریح تضمین نمی‌شود.

نصب

  1. ZIP افزونه را دانلود کنید.
  2. در WordPress وارد افزونه‌ها → افزودن افزونه تازه → بارگذاری افزونه شوید.
  3. فایل ZIP را انتخاب کنید.
  4. افزونه را نصب و فعال کنید.
  5. Frontend سایت را باز کنید.
  6. دکمه Track Order را مشاهده کنید.
  7. برای Orderهایی که ارسال شده‌اند Tracking Data را از بخش مدیریت Order تکمیل کنید.

نیازمندی‌ها

  • WordPress 6.0+
  • PHP 7.4+
  • WooCommerce

عیب‌یابی

سفارش پیدا نمی‌شود

موارد زیر را بررسی کنید:

  1. Order Identifier صحیح باشد.
  2. Order حذف نشده باشد.
  3. اگر Guest هستید Billing Email دقیقاً مربوط به همان Order باشد.
  4. اگر Login هستید Order متعلق به Account فعلی باشد.
  5. Sequential Order Number Plugin عدد نمایشی متفاوتی تولید نکرده باشد.

Guest اجازه مشاهده ندارد

Billing Email واردشده را با Billing Email سفارش بررسی کنید.

کاهش Security به Phone-only Lookup راهکار مناسبی برای رفع این خطا نیست.

Tracking Code نمایش داده نمی‌شود

بررسی کنید Tracking Data واقعاً روی Order ذخیره شده باشد.

وجود Status معتبر WooCommerce الزاماً به این معنی نیست که Staff کد رهگیری Shipment را ثبت کرده است.

Widget نمایش داده نمی‌شود

بررسی کنید:

  • Theme یا Plugin دیگری CSS آن را مخفی نکرده باشد.
  • JavaScript Error عمومی در صفحه وجود نداشته باشد.
  • Optimization/Minification باعث خرابی Script نشده باشد.
  • Condition مربوط به should_render() اجازه نمایش Widget در آن صفحه را بدهد.

چه کارهایی انجام نمی‌دهد؟

این افزونه:

  • پنل مدیریت Order برای مشتری نیست.
  • اطلاعات کامل Billing/Payment را Public نمی‌کند.
  • Phone-only Order Search ارائه نمی‌دهد.
  • جایگزین سیستم Carrier Tracking نیست.
  • در دسترس بودن Tracking URL شرکت حمل‌ونقل را تضمین نمی‌کند.
  • Fulfillment Management System کامل نیست.
  • تمام Orders را با اطلاعات مبهم مشتری Search نمی‌کند.
  • سازگاری با تمام Sequential Order Number Pluginها را تضمین نمی‌کند.
  • جایگزین WAF/CDN Rate Limiting نیست.

محدودیت‌ها

  • Guest باید Billing Email صحیح را داشته باشد.
  • Logged-in User فقط Order متعلق به خودش را می‌تواند Track کند.
  • کیفیت Tracking Data به اطلاعاتی وابسته است که Store Staff ثبت می‌کند.
  • سرویس/URL خارجی Carrier خارج از کنترل افزونه است.
  • Custom Order Number ممکن است Integration جداگانه بخواهد.
  • افزونه عمداً Lite است و یک Logistics Platform کامل نیست.

GitHub Description پیشنهادی

Lightweight WooCommerce order tracking widget with secure customer lookup, shipment tracking fields, order status progress, and HPOS support.

مجوز

GPL-3.0

نویسنده

Amirreza Shayesteh Far

GitHub: https://github.com/amirrezashf