wc-hpos-compatibility

Community

HPOS compatibility for WooCommerce plugins.

AuthorLonsdale201
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This skill guides plugin authors through declaring WooCommerce HPOS compatibility and adapting order data access to the HPOS backend to avoid breaking changes on WC 10.x.

Core Features & Use Cases

  • Declare compatibility with FeaturesUtil::declare_compatibility on before_woocommerce_init to enable HPOS support flags.
  • Use the WC Object model (wc_get_order, WC_Order::get_meta, update_meta_data, save) and wc_get_orders for all order CRUD and queries; avoid direct get_post_meta / WP_Query against orders.
  • Detect runtime mode with OrderUtil helpers and properly branch admin hooks and screens for HPOS vs legacy CPT to maintain compatibility during migration or sync-mode.
  • Prepare admin UI hooks and meta-box patterns using OrderUtil to ensure consistent screen handling across modes.

Quick Start

Declare HPOS compatibility using FeaturesUtil::declare_compatibility in the before_woocommerce_init hook and refactor all order interactions to wc_get_order, WC_Order::get_meta, and wc_get_orders.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: wc-hpos-compatibility
Download link: https://github.com/Lonsdale201/wp-agent-skills/archive/main.zip#wc-hpos-compatibility

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.