Woo admin

From OrcaQubits/agentic-commerce-skills-plugins · View interactive version

Woo admin is an AI agent skill from the GitHub repository OrcaQubits/agentic-commerce-skills-plugins. Build WooCommerce admin interfaces — settings pages, admin menus, product data tabs/panels, order meta boxes, WooCommerce Admin (React analytics), and reports. Use when creating admin-facing configuration or display pages.

How to use this skill

Skill file

WooCommerce Admin UI Development

Before writing code

Fetch live docs:

  1. Web-search site:developer.woocommerce.com settings api for Settings API guide
  2. Web-search site:developer.wordpress.org plugins administration-menus for WordPress admin menus
  3. Web-search woocommerce admin custom settings page for current patterns

Settings API

WC_Settings_API (For Gateways/Methods)

Payment gateways and shipping methods use WC_Settings_API:

WC_Settings_Page (Custom Settings Tabs)

Add a new tab to WooCommerce > Settings:

  1. Extend WC_Settings_Page
  2. Set $this->id and $this->label
  3. Implement get_settings_for_default_section() — return settings array
  4. Register via woocommerce_get_settings_pages filter

Settings Field Format

Each field is an array with keys:

Admin Menus

Adding Sub-Menus Under WooCommerce

add_submenu_page( 'woocommerce', $page_title, $menu_title, $capability, $slug, $callback )

Top-Level Menus

add_menu_page() for standalone admin sections — less common for WC extensions.

Capability Checks

Product Data Panels

Adding Tabs

Filter woocommerce_product_data_tabs:

$tabs['my_tab'] = [
    'label'    => __( 'My Tab', 'my-plugin' ),
    'target'   => 'my_tab_data',
    'class'    => [ 'show_if_simple', 'show_if_variable' ],
    'priority' => 60,
];

Adding Panel Content

Action woocommerce_product_data_panels:

Saving Panel Data

Action woocommerce_process_product_meta — receives $post_id:

Order Admin Customization

Meta Boxes

Add custom meta boxes to the order edit screen:

Order Actions

Filter woocommerce_order_actions to add custom order actions.

Bulk Actions

Filter bulk_actions-edit-shop_order (legacy) or bulk_actions-woocommerce_page_wc-orders (HPOS).

WooCommerce Admin (React-Based)

Analytics & Reports

WooCommerce Admin is a React SPA for:

Extending Analytics

Use @woocommerce/data and @woocommerce/components packages:

Admin Notices

WooCommerce Admin Notices

Best Practices

Fetch the WooCommerce Settings API docs and WordPress admin handbook for exact field types, hook names, and screen IDs before implementing.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.