wc-store-api

Integrate WooCommerce Store API endpoints for cart, checkout, and product browsing.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/vikingokft/wp-agent-skills --skill wc-store-api
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wc-store-api
Source: https://github.com/vikingokft/wp-agent-skills/tree/main/woocommerce/wc-store-api
Command: npx skills add https://github.com/vikingokft/wp-agent-skills --skill wc-store-api

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the confusion between WooCommerce’s public shopper-facing Store API and the admin/integration WC REST API, preventing broken checkout/cart integrations and leaking wrong authentication assumptions.

Core Features & Use Cases

  • Correct API selection for storefront cart/checkout: Use /wp-json/wc/store/v1 for browsing products and reading/updating the current shopper cart and checkout state instead of wc/v4.
  • Nonce vs Cart-Token write protection: Implement the required Nonce header (wp_create_nonce('wc_store_api')) or use Cart-Token for headless continuity across requests.
  • Extend Store API responses and mutate cart via blocks: Add public extensions.<namespace> data and update cart state through /cart/extensions using extensionCartUpdate, while keeping extension data read-only and safe.

Quick Start

Ask the AI to explain which endpoints and headers you must use to implement a headless cart/checkout that updates custom cart state and exposes extra checkout-block data via Store API.

Frequently Asked Questions about wc-store-api

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

FAQPage Schema
How do I authenticate WooCommerce Store API writes for a headless cart?

WooCommerce Store API writes require a Nonce header using wp_create_nonce('wc_store_api') or a Cart-Token header to maintain headless cart continuity across requests securely.

Should I use wc/store/v1 or wc/v4 for a headless WooCommerce checkout?

Use the /wp-json/wc/store/v1 route set for shopper-facing cart and checkout operations instead of wc/v4, which is designed for admin and integration tasks rather than storefront interactions.

How do I extend WooCommerce Store API responses with custom checkout block data?

Register public extension data under extensions.<namespace> using woocommerce_store_api_register_endpoint_data on woocommerce_blocks_loaded, keeping the exposed extension data read-only and safe.

How do I mutate cart state in a headless WooCommerce storefront?

Mutate cart state by calling /cart/extensions with extensionCartUpdate and register your update logic via woocommerce_store_api_register_update_callback, ensuring callbacks return arrays.

How do I filter payment method availability in WooCommerce Store API?

Filter payment availability in the Store API by applying Store API payment requirements, ensuring only valid payment options are presented during the headless checkout process.

Why does my WooCommerce headless cart update fail with a 403 error?

Headless cart updates fail when the proper request headers are missing; you must include the correct Nonce or Cart-Token headers to authorize Store API write operations successfully.