← ClaudeAtlas

wp-woocommercelisted

Use when building, extending, or debugging a WooCommerce plugin — custom product types, payment gateways (WC_Payment_Gateway, process_payment(), process_refund()), shipping methods (WC_Shipping_Method, calculate_shipping()), CRUD via WC_Product / WC_Order / WC_Customer (wc_get_product, wc_create_order, wc_get_orders, get_meta, update_meta_data), HPOS compatibility (FeaturesUtil::declare_compatibility, wc_get_orders instead of WP_Query on posts), REST API extensions (woocommerce_rest_prepare, woocommerce_rest_pre_insert, Store API woocommerce_store_api_register_endpoint_data), cart/checkout blocks (registerCheckoutFilters, extensionCartUpdate, SlotFills), key hooks (woocommerce_cart_calculate_fees, woocommerce_checkout_fields, woocommerce_order_status_changed, woocommerce_payment_gateways), or WooCommerce subscription/coupon/webhook logic. Triggers: "WooCommerce extension", "custom product type", "payment gateway", "hook into WooCommerce checkout", "WC_Order", "wc_create_order()", "wc_get_product()", "add a sh
mralaminahamed/wp-dev-skills · ★ 27 · Code & Development · score 77
Install: claude install-skill mralaminahamed/wp-dev-skills
# WooCommerce Extension Development > **Model note:** Complex — payment gateways, HPOS compatibility, and block cart/checkout require multi-file reasoning. Use `sonnet` or `opus`. `haiku` for isolated CRUD or hook lookups only. Guide for building WooCommerce extensions: custom product types, payment gateways, hooks, CRUD, REST, and admin UI. Assumes the host plugin passes the `wp-plugin-audit` baseline and the official `wp-plugin-development` security conventions. ## When to use - "Add a custom product type", "create a payment gateway", "add a shipping method". - "Extend the WooCommerce REST API", "add fields to WC orders/products". - "Build a WooCommerce admin tab", "add product meta", "custom checkout field". - "Hook into WC cart/checkout", "add a fee", "apply a discount programmatically". - "Debug WooCommerce order status flow", "fix a WC hook not firing". **Not for:** General WordPress plugin architecture — use `wp-plugin-development`. PHPStan types for WC — use `wp-phpstan-stubs` to scaffold WC stubs. ## Method ### 1. Identify extension point category Determine which WC subsystem applies before writing code: | Goal | Subsystem | |---|---| | Custom product type | `WC_Product` subclass + `product_type_query` filter | | Payment gateway | `WC_Payment_Gateway` subclass + `woocommerce_payment_gateways` filter | | Shipping method | `WC_Shipping_Method` subclass + `woocommerce_shipping_methods` filter | | Custom order status | `wc_register_order_status` + `wc_order_stat