Woo catalog

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

Woo catalog is an AI agent skill from the GitHub repository OrcaQubits/agentic-commerce-skills-plugins. Work with WooCommerce catalog — product types, categories, tags, attributes, product queries, search, related products, and product visibility. Use when managing products programmatically or customizing the catalog display.

How to use this skill

Skill file

WooCommerce Catalog & Products

Before writing code

Fetch live docs:

  1. Web-search site:developer.woocommerce.com products for product documentation
  2. Fetch https://woocommerce.github.io/code-reference/ for class reference
  3. Web-search woocommerce custom product type implementation for custom product types

Product Types

Built-In Types

| Type | Class | Description |

|------|-------|-------------|

| Simple | WC_Product_Simple | Single product, no options |

| Variable | WC_Product_Variable | Product with variations (size, color) |

| Variation | WC_Product_Variation | Individual variation of a variable product |

| Grouped | WC_Product_Grouped | Collection of related simple products |

| External/Affiliate | WC_Product_External | Linked to external URL |

Virtual & Downloadable Flags

Any product can be marked:

Custom Product Types

  1. Extend WC_Product (or WC_Product_Simple)
  2. Register the type via woocommerce_product_type_selector filter
  3. Register the class via woocommerce_product_class filter or woocommerce_product_type_{type} class name filter

Product Factory

WC_Product_Factory resolves a product ID to the correct class:

Product CRUD

Creating Products

$product = new WC_Product_Simple();
$product->set_name( 'My Product' );
$product->set_regular_price( '29.99' );
$product->set_status( 'publish' );
$product->save();

Querying Products

wc_get_products( $args ) — primary query method:

WC_Product_Query

Object-oriented query builder — same as wc_get_products() but chainable.

Categories & Taxonomies

Product Categories

Taxonomy: product_cat (hierarchical)

Product Tags

Taxonomy: product_tag (non-hierarchical)

Product Type

Taxonomy: product_type — internal, determines the product class.

Custom Taxonomies

Register with register_taxonomy() associated with product post type. Set show_in_rest => true for block editor and API support.

Product Visibility

Catalog Visibility

$product->set_catalog_visibility( $visibility ):

Stock Status

$product->set_stock_status( $status ):

Product Images

Variable Products & Variations

Variable Product Setup

  1. Create WC_Product_Variable
  2. Define attributes with set_attributes() (mark as variation = true)
  3. Create WC_Product_Variation for each combination
  4. Each variation has its own price, SKU, stock, image

Variation Attributes

Each variation specifies attribute values:

Related Products & Upsells

Best Practices

Fetch the WooCommerce product documentation and code reference for exact method signatures, query parameters, and product type registration patterns 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.