What problem does it solve?
This guideline helps developers build WooCommerce extensions that are HPOS-compatible, secure, and maintainable by following established APIs, patterns, and safety practices.
Core Features & Use Cases
- HPOS-safe data access patterns (e.g., using wc_get_order, wc_get_product, and WC_Order/WC_Product APIs) to avoid direct WP_Post queries on orders.
- Hook-driven extension development for payments, shipping, emails, products, and settings, ensuring compatibility with WooCommerce core.
- REST API extension guidance (add custom fields, endpoints) and secure data handling to avoid leaking sensitive information.
- Security-focused patterns: permissions checks, sanitization, and safe meta storage, plus HPOS compatibility declarations when applicable.
- Use case: Build a payment gateway extension that processes orders via HPOS-safe queries and registers through standard WooCommerce hooks.
Quick Start
Create a new WooCommerce extension using HPOS-safe data access patterns, then register a gateway or shipping method via standard WooCommerce hooks and declare HPOS compatibility.