Option 1: UCP plugin (recommended for most merchants)
The simplest path for WooCommerce merchants is a dedicated UCP plugin. Several were published to the WordPress plugin repository in Q1 2026. These plugins automatically expose UCP-compliant REST endpoints using your existing WooCommerce product data, inventory, and order management, no custom code required.
What a UCP plugin typically handles: catalog endpoint generation from WooCommerce product catalog, inventory sync from WooCommerce stock management, checkout routing to your existing payment gateway via AP2 wrapper, and order creation in WooCommerce admin from agent purchases.
Before installing, verify the plugin: has active maintenance, is compatible with your WooCommerce version, supports the AP2 payment flow for your payment processor, and ideally has UCP certification testing built in.
Option 2: Custom REST API implementation
Merchants with developer resources who want full control can build UCP endpoints directly using the WooCommerce REST API as the backend. WooCommerce exposes its own REST API at /wp-json/wc/v3/, your UCP layer translates between the WooCommerce API format and the UCP specification.
Catalog endpoint
Your POST /catalog/search endpoint should query the WooCommerce products API and transform the response to UCP format. The key field mapping:
- WooCommerce
id→ UCPid - WooCommerce
name→ UCPname - WooCommerce
description(stripped of HTML) → UCPdescription - WooCommerce
regular_price→ UCPprice - WooCommerce
currency→ UCPcurrency - WooCommerce
stock_status(instock/outofstock) → UCPavailability(InStock/OutOfStock) - WooCommerce
categories[0].name→ UCPcategory(mapped to UCP taxonomy)
Sample PHP endpoint registration
add_action('rest_api_init', function() {
register_rest_route('ucp/v1', '/catalog', array(
'methods' => 'GET',
'callback' => 'ucp_get_catalog',
'permission_callback' => 'ucp_verify_agent_cert',
));
});
function ucp_get_catalog($request) {
$wc_products = wc_get_products(array(
'status' => 'publish',
'limit' => $request->get_param('limit') ?: 50,
'page' => $request->get_param('page') ?: 1,
));
$ucp_products = array_map('map_wc_to_ucp', $wc_products);
return rest_ensure_response(array(
'products' => $ucp_products,
'total' => wp_count_posts('product')->publish,
));
} Payment integration: connecting AP2
The payment layer requires your WooCommerce payment gateway to support AP2 token processing. For Stripe (the most common WooCommerce payment processor): install the Stripe AP2 extension for WooCommerce (available via Stripe's plugin library), configure your AP2 merchant token in Stripe Dashboard → Agentic Commerce, and update your UCP checkout endpoint to pass AP2 tokens to Stripe's AP2 payment intent API.
For other processors (Adyen, PayPal, Square): contact your processor for their WooCommerce + AP2 integration guide. All UCP-coalition payment processors have published WooCommerce integration documentation.
Inventory sync: keeping data fresh
A common issue with WooCommerce UCP implementations is stale inventory data. WooCommerce does not natively push stock changes to external APIs, your UCP endpoints must pull current stock on each request. For high-traffic stores, add a caching layer (Redis or WordPress Transients API) with a maximum 15-minute TTL. For lower-traffic stores, query WooCommerce stock directly on each UCP request, the overhead is typically acceptable.
Testing your implementation
Before registering your endpoint, validate with these steps:
- Test catalog endpoint:
curl -H "Authorization: Bearer [test-token]" https://yourstore.com/catalog/search, verify response matches UCP schema - Test availability endpoint for a specific product ID, verify real-time stock reflection
- Run an end-to-end checkout in a staging environment you control and verify the resulting WooCommerce order
- Validate staging responses against the versioned UCP schemas and your own contract tests
- Check response times, all endpoints should respond within 3 seconds
Publishing your WooCommerce UCP profile
UCP discovery is decentralized. Publish a valid business profile at /.well-known/ucp, advertise the supported version, transport, schema and base endpoint, then keep the profile reachable over HTTPS without redirects. The current UCP specification does not define a central merchant registry or a certification token.