woocommerce-plugin-development

Create custom WooCommerce plugins using hooks, the Settings API, and REST API extensions.

3|1|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/tomtoto757/ecomm-ai-team --skill woocommerce-plugin-development-tomtoto757
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: woocommerce-plugin-development
Source: https://github.com/tomtoto757/ecomm-ai-team/tree/main/skills/platform-integrations-infrastructure/finsilabs/platform-woocommerce/woocommerce-plugin-development
Command: npx skills add https://github.com/tomtoto757/ecomm-ai-team --skill woocommerce-plugin-development-tomtoto757

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Extending WooCommerce without modifying core files requires deep knowledge of WordPress hooks, the Settings API, and HPOS compatibility rules, and mistakes lead to broken stores after updates or lost order data. ## Core Features & Use Cases - Plugin Boilerplate & HPOS Compatibility: Scaffold upgrade-safe plugins with proper headers, WooCommerce dependency checks, and High-Performance Order Storage declarations. - Order Lifecycle Hooks & Product Customization: Hook into order status transitions, add custom product data tabs, and modify cart and checkout behavior with filters. - Settings API, Shipping Methods & REST Endpoints: Build admin configuration pages, custom shipping rate calculators, and permission-protected REST API routes. - Use Case: A store integrates with a warehouse management system and needs a plugin that detects completed orders, records a fulfillment token via HPOS-safe meta methods, and exposes an admin-only analytics endpoint. ## Quick Start Ask the AI to build a WooCommerce plugin that hooks into order completion, stores a custom meta field using HPOS-compatible methods, and adds a settings tab in the WooCommerce admin.

Frequently Asked Questions about woocommerce-plugin-development

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

FAQPage Schema
How do I create a custom WooCommerce plugin in PHP?▼

Create a PHP file with a plugin header declaring 'Requires Plugins: woocommerce', guard it with an ABSPATH check, and initialize your code on the woocommerce_loaded action. Then register hooks for the order, product, or checkout events you want to extend.

How to add a custom settings tab in WooCommerce admin?▼

Register the tab with the woocommerce_settings_tabs_array filter, render fields via the woocommerce_settings_tabs_{id} action using woocommerce_admin_fields(), and save them with woocommerce_update_options() on the woocommerce_update_options_{id} action.

Does WooCommerce HPOS break plugins that use get_post_meta?▼

Yes, plugins reading order data with get_post_meta() fail when High-Performance Order Storage is enabled because orders move to custom tables. Use $order->get_meta() and $order->update_meta_data() with $order->save(), and declare compatibility via FeaturesUtil::declare_compatibility().

How do I create a custom WooCommerce shipping method?▼

Extend the WC_Shipping_Method class, register it through the woocommerce_shipping_methods filter, and declare support for shipping-zones and instance-settings. Implement calculate_shipping() to call $this->add_rate() with an id, label, and computed cost.

Why does my WooCommerce REST endpoint return a 403 error?▼

A 403 occurs when the permission_callback rejects the request. For admin endpoints use current_user_can('manage_woocommerce') as the permission_callback, and register routes inside the rest_api_init action with register_rest_route().

Why do WooCommerce hooks fire multiple times?▼

Hooks like order status transitions can fire repeatedly, causing duplicate emails or double stock reduction. Guard against reprocessing with a static flag or transient, or check execution counts with did_action() before running your logic.