woocommerce

Guide HPOS-safe WooCommerce extension development with secure data access patterns.

2|Updated Feb 21, 2026
One-click install
npx skills add https://github.com/joseconti/mcp-skills --skill woocommerce-joseconti
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: woocommerce
Source: https://github.com/joseconti/mcp-skills/tree/main/custom/woocommerce
Command: npx skills add https://github.com/joseconti/mcp-skills --skill woocommerce-joseconti

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

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.

Frequently Asked Questions about woocommerce

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make my WooCommerce extension HPOS compatible?▼

To make a WooCommerce extension HPOS compatible, use HPOS-safe data access patterns like wc_get_order and wc_get_product instead of direct WP_Post queries, and declare HPOS compatibility in your plugin code.

What is the best way to access order data in WooCommerce without breaking HPOS?▼

The best way to access order data without breaking HPOS is using wc_get_order and WC_Order APIs rather than direct database queries, ensuring your extension remains compatible with custom order tables.

How do I add custom fields to the WooCommerce REST API securely?▼

To add custom fields to the WooCommerce REST API securely, follow REST API extension guidelines using proper hooks, implement permission checks, and sanitize data to prevent leaking sensitive information.

How do I build a WooCommerce payment gateway extension that is HPOS-safe?▼

Build a WooCommerce payment gateway by processing orders through HPOS-safe queries with wc_get_order, then register the gateway via standard WooCommerce hooks to ensure core compatibility.

Why does my WooCommerce plugin break after enabling HPOS?▼

Your WooCommerce plugin breaks after enabling HPOS if it uses direct WP_Post queries on orders instead of safe data access functions like wc_get_order and WC_Order APIs.

Do I need to declare HPOS compatibility for my WooCommerce shipping extension?▼

Yes, you need to declare HPOS compatibility for your WooCommerce shipping extension and use HPOS-safe data access patterns to ensure it functions correctly with custom order tables.