woo-checkout

Customize WooCommerce checkout — classic and block-based checkout, custom fields, validation, order processing, and checkout extensibility. Use when modifying the checkout flow, adding custom checkout fields, or integrating checkout extensions.

17 stars

Best use case

woo-checkout is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Customize WooCommerce checkout — classic and block-based checkout, custom fields, validation, order processing, and checkout extensibility. Use when modifying the checkout flow, adding custom checkout fields, or integrating checkout extensions.

Teams using woo-checkout should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/woo-checkout/SKILL.md --create-dirs "https://raw.githubusercontent.com/OrcaQubits/agentic-commerce-skills-plugins/main/dist/antigravity/woocommerce-commerce/.agent/skills/woo-checkout/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/woo-checkout/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How woo-checkout Compares

Feature / Agentwoo-checkoutStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Customize WooCommerce checkout — classic and block-based checkout, custom fields, validation, order processing, and checkout extensibility. Use when modifying the checkout flow, adding custom checkout fields, or integrating checkout extensions.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# WooCommerce Checkout Customization

## Before writing code

**Fetch live docs**:
1. Web-search `site:developer.woocommerce.com checkout` for checkout documentation
2. Web-search `woocommerce checkout blocks extensibility api` for block checkout patterns
3. Web-search `woocommerce classic checkout customization hooks` for classic checkout hooks

## Two Checkout Implementations

### Classic Checkout (Shortcode-Based)

- Uses `[woocommerce_checkout]` shortcode
- PHP-rendered with `WC_Checkout` class
- Fully extensible via actions and filters
- Template: `checkout/form-checkout.php`

### Block-Based Checkout (Default Since WC 8.3)

- Uses the Checkout Block in the block editor
- React-rendered on the frontend
- Extended via the Store API and `@woocommerce/blocks-checkout` package
- More structured extension API but different from classic hooks

## Classic Checkout Customization

### Checkout Fields

Filter `woocommerce_checkout_fields` to modify fields:
- Field groups: `billing`, `shipping`, `account`, `order`
- Each field has: `type`, `label`, `placeholder`, `required`, `class`, `priority`, `validate`
- Field types: `text`, `textarea`, `select`, `radio`, `checkbox`, `email`, `tel`, `password`, `country`, `state`

### Adding Custom Fields

Add to the fields array in the `woocommerce_checkout_fields` filter:
- Set `priority` to control ordering
- Set `custom_attributes` for HTML attributes

### Validating Custom Fields

Action `woocommerce_checkout_process`:
- Check `$_POST` values
- Add errors with `wc_add_notice( $message, 'error' )`

### Saving Custom Field Data

Action `woocommerce_checkout_update_order_meta` (legacy) or `woocommerce_checkout_order_processed`:
- Save to order meta: `$order->update_meta_data( '_my_field', $value ); $order->save();`

### Displaying Custom Fields

- Admin: `woocommerce_admin_order_data_after_billing_address` action
- Emails: `woocommerce_email_after_order_table` action
- Thank-you page: `woocommerce_thankyou` action

## Block Checkout Customization

### Extending via Store API

Add custom data to checkout process:
1. Register endpoint data with `ExtendSchema::register_endpoint_data()`
2. Process during checkout via `woocommerce_store_api_checkout_update_order_from_request`

### Checkout Filters (JS)

`registerCheckoutFilters` from `@woocommerce/blocks-checkout`:
- `itemName` — modify cart item name
- `cartItemPrice` — modify displayed price
- `subtotalPriceFormat` — modify subtotal format
- `coupons` — modify coupon display
- Custom filters via `__experimental_woocommerce_blocks_checkout_update_shipping_address`

### Slot Fills (JS)

Inject React components at predefined points:
- `ExperimentalOrderMeta` — after order summary
- `ExperimentalDiscountsMeta` — after discounts
- `ExperimentalOrderShippingPackages` — shipping packages area

### Inner Blocks

Register custom blocks as checkout inner blocks for maximum layout control.

## Checkout Flow

### Order Processing Sequence

1. Validate fields (`woocommerce_checkout_process`)
2. Create order (`woocommerce_checkout_create_order`)
3. Process payment (`WC_Payment_Gateway::process_payment()`)
4. On success: redirect to thank-you page
5. Hooks: `woocommerce_checkout_order_processed`, `woocommerce_payment_complete`, `woocommerce_thankyou`

### Cart to Order Conversion

`WC_Checkout::create_order()`:
- Creates `WC_Order` from cart data
- Copies billing/shipping addresses, line items, fees, coupons
- Applies `woocommerce_checkout_create_order` filter

## Checkout Fees

Add fees via `woocommerce_cart_calculate_fees` action:
- `WC()->cart->add_fee( $name, $amount, $taxable, $tax_class )`
- Negative amounts for discounts

## Best Practices

- Support both classic and block checkout — test with both
- Use CRUD methods to save order data (HPOS compatible)
- Validate on the server side — never trust client-side validation
- Sanitize all checkout field input
- Use nonces for classic checkout forms
- Add clear error messages with `wc_add_notice()`
- Declare `cart_checkout_blocks` compatibility

Fetch the WooCommerce checkout documentation for exact hook names, Store API extension methods, and block checkout patterns before implementing.

Related Skills

ucp-embedded-checkout

17
from OrcaQubits/agentic-commerce-skills-plugins

Implement UCP Embedded Checkout Protocol — iframe/webview-based checkout UI for human escalation using JSON-RPC 2.0 over postMessage. Use when the checkout status is requires_escalation and the buyer needs a merchant-hosted UI.

ucp-checkout-rest

17
from OrcaQubits/agentic-commerce-skills-plugins

Implement UCP Checkout over the REST binding — create, get, update, complete, and cancel checkout sessions with proper headers, idempotency, status transitions, and error handling. Use when building REST-based UCP checkout endpoints or clients.

ucp-checkout-mcp

17
from OrcaQubits/agentic-commerce-skills-plugins

Implement UCP Checkout over the MCP (Model Context Protocol) binding — expose checkout operations as MCP tools for AI agents. Use when building an MCP server that AI agents like Claude or Gemini can call for commerce, or when integrating with Shopify's MCP endpoint.

ucp-checkout-a2a

17
from OrcaQubits/agentic-commerce-skills-plugins

Implement UCP Checkout over the A2A (Agent-to-Agent) binding — enable autonomous agent-to-agent commerce using Agent Cards and structured message parts. Use when building agent-to-agent commerce flows.

spree-checkout

17
from OrcaQubits/agentic-commerce-skills-plugins

Implement Spree's checkout — the Order state machine (cart → address → delivery → payment → confirm → complete), the Payment and Shipment sub-state machines, the return flow (ReturnAuthorization → CustomerReturn → Reimbursement → Refund), guest checkout, payment-step skipping for credit-covered orders, and the V3 checkout API surface. Use when building or customizing checkout flows, debugging state transitions, or wiring custom checkout steps.

shopify-checkout-ui

17
from OrcaQubits/agentic-commerce-skills-plugins

Build Shopify checkout UI extensions — extension targets, UI primitives, Preact/Remote DOM rendering, checkout APIs, metafield access, post-purchase extensions, and thank-you page customization. Use when customizing Shopify checkout.

saleor-checkout

17
from OrcaQubits/agentic-commerce-skills-plugins

Implement the Saleor checkout flow — checkout creation, line items, shipping/billing addresses, delivery methods, payment, and completion. Use when building checkout experiences.

medusa-cart-checkout

17
from OrcaQubits/agentic-commerce-skills-plugins

Implement Medusa v2 cart and checkout — cart lifecycle, line items, shipping and payment selection, sales channels, and checkout completion flow. Use when building cart and checkout features.

magento-checkout

17
from OrcaQubits/agentic-commerce-skills-plugins

Customize Magento 2 checkout — payment methods, shipping carriers, totals collectors, and checkout UI. Use when building custom payment/shipping integrations or modifying the checkout flow.

bc-checkout

17
from OrcaQubits/agentic-commerce-skills-plugins

Customize BigCommerce checkout — Checkout SDK, embedded checkout, server-side checkout API, custom checkout UI, and checkout extensions. Use when modifying the checkout experience or building headless checkout flows.

acp-checkout-rest

17
from OrcaQubits/agentic-commerce-skills-plugins

Implement the ACP REST checkout API — create, update, retrieve, complete, and cancel checkout sessions. Use when building merchant-side checkout endpoints, handling the checkout session state machine, or integrating with AI agent checkout flows.

acp-checkout-mcp

17
from OrcaQubits/agentic-commerce-skills-plugins

Implement ACP checkout as an MCP server, exposing checkout operations as MCP tools. Use when building an MCP-based commerce server for AI agents that use tool-calling to complete purchases.