WP Manifestindependent plugin directory
manifest / ecommerce / trailgear-toolkit

TrailGear

"A custom WooCommerce plugin for outdoor-gear stores — rentable products, custom checkout fields, a REST API endpoint, low-stock automation, and cart pricing rules.

by Philip Adams · github.com/philipad1234/trailgear-toolkit

0stars
0forks

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/philipad1234/trailgear-toolkit/archive/refs/heads/main.zip

A custom WooCommerce plugin built for a fictional outdoor-gear store, demonstrating PHP/WordPress plugin development beyond drag-and-drop store configuration — custom product logic, checkout customization, a REST API endpoint, admin tooling, and automation, all built from scratch using WordPress/WooCommerce hooks and filters.

Why this exists

This is a portfolio project. Rather than just configuring an off-the-shelf WooCommerce store, the goal here is to show hands-on PHP work: writing a proper plugin (not theme functions.php snippets), following WordPress plugin architecture conventions, and using WooCommerce's hook system the way a real client project would require.

Demo store: outdoor/hiking gear retailer ("TrailGear").

Features

  • [x] Plugin scaffold with standard WordPress plugin header
  • [X] Custom checkout field (preferred delivery date, saved to order meta)
  • [ ] REST API endpoint (low-stock product report)
  • [ ] Admin settings page (WP Settings API)
  • [ ] Custom "Rentable Gear" product type
  • [ ] WP-Cron automation (daily low-stock email digest)
  • [ ] Cart pricing rule (bulk-discount fee)
  • [ ] Order email customization

Requirements

  • WordPress 6.0+
  • WooCommerce 8.0+
  • PHP 8.0+

Installation

  1. Download or clone this repository.
  2. Copy (or symlink) the trailgear-toolkit folder into wp-content/plugins/.
  3. In wp-admin, go to Plugins and activate TrailGear Toolkit.
  4. Requires WooCommerce to be installed and active — the plugin will show an admin notice and stay dormant if WooCommerce isn't detected.

Project structure

trailgear-toolkit/
├── trailgear-toolkit.php # Main plugin file, header + bootstrap
├── includes/ # Feature classes (checkout fields, REST API, etc.)
└── admin/ # Admin-only functionality (settings page)

Development notes

Custom checkout field

Added a "Preferred Delivery Date" field using woocommerce_after_order_notes to render it on checkout, woocommerce_checkout_update_ordermeta to sanitize and persist the value as order meta (prefixed with to keep it out of WordPress's generic Custom Fields UI), and woocommerce_admin_order_data_after_billing_address to surface it on the admin order screen. Input is sanitized on save (sanitize_text_field) and escaped on output (esc_html)

Author

Philip Adams

https://philip-adams-portfolio.vercel.app/

License

GPL-2.0+ (standard for WordPress plugins)