{"id":335249,"date":"2026-07-15T05:23:47","date_gmt":"2026-07-15T05:23:47","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/ucp-enabler-for-woocommerce\/"},"modified":"2026-07-15T05:23:10","modified_gmt":"2026-07-15T05:23:10","slug":"wt-ucp-enabler-for-woocommerce","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/wt-ucp-enabler-for-woocommerce\/","author":15888981,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.0","stable_tag":"1.0.0","tested":"7.0.1","requires":"6.0","requires_php":"7.4","requires_plugins":null,"header_name":"WebToffee Universal Commerce Protocol Enabler for Woocommerce","header_author":"WebToffee","header_description":"Exposes your WooCommerce store as a Universal Commerce Protocol (UCP) business \u2014 serving a \/.well-known\/ucp discovery profile and REST endpoints for Checkout, Cart, Order, and Catalog capabilities so AI agents can shop your store.","assets_banners_color":"270f46","last_updated":"2026-07-15 05:23:10","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/wordpress.org\/plugins\/wt-ucp-enabler-for-woocommerce\/","header_author_uri":"https:\/\/www.webtoffee.com\/","rating":0,"author_block_rating":0,"active_installs":0,"downloads":30,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"webtoffee","date":"2026-07-15 05:23:10"}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3608540,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3608540,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3608808,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3608808,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0"],"block_files":[],"assets_screenshots":[],"screenshots":{"1":"<strong>WooCommerce \u2192 UCP Enabler \u2014 General<\/strong> \u2014 protocol version, endpoint, and cache settings.","2":"<strong>Capabilities tab<\/strong> \u2014 toggle each UCP capability on or off with a switch, including the new Discount capability.","3":"<strong>Payment Handler tab<\/strong> \u2014 configure PSP tokenizer credentials and accepted card brands.","4":"<strong>\/.well-known\/ucp<\/strong> \u2014 the live discovery profile served by the plugin, now including <code>dev.ucp.shopping.discount<\/code>."}},"plugin_section":[],"plugin_tags":[271422,3148,23853,254710,286],"plugin_category":[45],"plugin_contributors":[153972],"plugin_business_model":[],"class_list":["post-335249","plugin","type-plugin","status-publish","hentry","plugin_tags-ai-commerce","plugin_tags-checkout","plugin_tags-rest-api","plugin_tags-ucp","plugin_tags-woocommerce","plugin_category-ecommerce","plugin_contributors-webtoffee","plugin_committers-webtoffee"],"banners":{"banner":"https:\/\/ps.w.org\/wt-ucp-enabler-for-woocommerce\/assets\/banner-772x250.png?rev=3608808","banner_2x":"https:\/\/ps.w.org\/wt-ucp-enabler-for-woocommerce\/assets\/banner-1544x500.png?rev=3608808","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/wt-ucp-enabler-for-woocommerce\/assets\/icon-128x128.png?rev=3608540","icon_2x":"https:\/\/ps.w.org\/wt-ucp-enabler-for-woocommerce\/assets\/icon-256x256.png?rev=3608540","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p><strong>WebToffee Universal Commerce Protocol Enabler for Woocommerce<\/strong> integrates your store with the <a href=\"https:\/\/ucp.dev\">Universal Commerce Protocol<\/a> \u2014 the open standard that lets AI assistants (Google AI Mode, Gemini, ChatGPT, and others) discover, browse, and purchase from your store without custom builds for each platform.<\/p>\n\n<p>Once activated, two things happen automatically:<\/p>\n\n<ol>\n<li><strong>A discovery profile is published at <code>\/.well-known\/ucp<\/code><\/strong> \u2014 the standard entry point that AI platforms fetch to learn what your store supports.<\/li>\n<li><strong>REST endpoints go live at <code>\/wp-json\/wt-ucp\/v1\/<\/code><\/strong> \u2014 implementing the five standard UCP capabilities.<\/li>\n<\/ol>\n\n<h4>Capabilities<\/h4>\n\n<p><strong>Checkout<\/strong> (<code>dev.ucp.shopping.checkout<\/code>)\nCreate, update, and complete checkout sessions. An AI agent calls <code>POST \/checkout-sessions<\/code> with a list of items and buyer details, updates it with shipping info via <code>PUT<\/code>, then finalises payment via <code>POST ...\/complete<\/code>. Sessions map directly to WooCommerce pending orders.<\/p>\n\n<p><strong>Cart<\/strong> (<code>dev.ucp.shopping.cart<\/code>)\nSession-based basket building before a purchase is ready to commit. The agent creates a cart with <code>POST \/carts<\/code>, then optionally hands it off to the human buyer via a <code>continue_url<\/code> that loads items into the WooCommerce frontend cart and redirects to the cart page.<\/p>\n\n<p><strong>Order<\/strong> (<code>dev.ucp.shopping.order<\/code>)\nLets agents check the status of any order using <code>GET \/orders\/{id}<\/code>, covering the full WooCommerce order lifecycle from pending to fulfilled.<\/p>\n\n<p><strong>Catalog<\/strong> (<code>dev.ucp.shopping.catalog<\/code>)\nProduct search via <code>GET \/catalog\/search<\/code> and individual item lookup via <code>GET \/catalog\/items\/{id}<\/code>. Returns prices in minor currency units as required by the spec.<\/p>\n\n<p><strong>Discount<\/strong> (<code>dev.ucp.shopping.discount<\/code>)\nExtends the Cart and\/or Checkout capabilities with coupon code support. An agent submits <code>discounts.codes<\/code> inside any Cart or Checkout create\/update request. The plugin validates each code against WooCommerce coupons, applies the discount, and returns the structured <code>discounts.applied<\/code> array alongside updated line-item and order-level totals. Coupons applied automatically by WooCommerce hooks are surfaced as <code>automatic: true<\/code> entries. Supports <code>percent<\/code>, <code>fixed_cart<\/code>, and <code>fixed_product<\/code> WooCommerce coupon types. Rejected codes are returned as typed <code>messages<\/code> entries (e.g. <code>discount_code_expired<\/code>, <code>discount_code_combination_disallowed<\/code>).<\/p>\n\n<h4>Discount Behaviour<\/h4>\n\n<ul>\n<li><strong>Replacement semantics<\/strong> \u2014 each Cart or Checkout PUT replaces the full set of applied codes. Send an empty <code>discounts.codes<\/code> array to clear all discounts.<\/li>\n<li><strong>Cart sessions<\/strong> \u2014 discounts are computed entirely in PHP against <code>WC_Coupon<\/code> without requiring a live WooCommerce cart session. Per-line <code>items_discount<\/code> totals are injected into <code>line_items[].totals<\/code> and the cart-level <code>totals<\/code> array.<\/li>\n<li><strong>Checkout sessions<\/strong> \u2014 discounts are applied directly to the WooCommerce order via <code>$order-&gt;apply_coupon()<\/code>. <code>$order-&gt;calculate_totals()<\/code> is called automatically; the response reflects WooCommerce's authoritative totals.<\/li>\n<li><strong>Total types<\/strong> \u2014 line-item-level discounts appear as <code>items_discount<\/code> entries; order-level discounts appear as <code>discount<\/code> entries, matching the UCP spec distinction.<\/li>\n<li><strong>Automatic coupons<\/strong> \u2014 coupons applied by a WooCommerce hook (not in the submitted codes) are returned in <code>discounts.applied<\/code> with <code>\"automatic\": true<\/code> and no <code>code<\/code> field.<\/li>\n<\/ul>\n\n<h4>REST Endpoints<\/h4>\n\n\n\n\n  Method\n  Path\n  Capability\n\n\n\n\n  GET\n  <code>\/wp-json\/wt-ucp\/v1\/catalog\/search<\/code>\n  Catalog\n\n\n  GET\n  <code>\/wp-json\/wt-ucp\/v1\/catalog\/items\/{id}<\/code>\n  Catalog\n\n\n  POST\n  <code>\/wp-json\/wt-ucp\/v1\/carts<\/code>\n  Cart\n\n\n  GET\n  <code>\/wp-json\/wt-ucp\/v1\/carts\/{id}<\/code>\n  Cart\n\n\n  PUT\n  <code>\/wp-json\/wt-ucp\/v1\/carts\/{id}<\/code>\n  Cart\n\n\n  POST\n  <code>\/wp-json\/wt-ucp\/v1\/checkout-sessions<\/code>\n  Checkout\n\n\n  GET\n  <code>\/wp-json\/wt-ucp\/v1\/checkout-sessions\/{id}<\/code>\n  Checkout\n\n\n  PUT\n  <code>\/wp-json\/wt-ucp\/v1\/checkout-sessions\/{id}<\/code>\n  Checkout\n\n\n  POST\n  <code>\/wp-json\/wt-ucp\/v1\/checkout-sessions\/{id}\/complete<\/code>\n  Checkout\n\n\n  POST\n  <code>\/wp-json\/wt-ucp\/v1\/checkout-sessions\/{id}\/cancel<\/code>\n  Checkout\n\n\n  GET\n  <code>\/wp-json\/wt-ucp\/v1\/orders\/{id}<\/code>\n  Order\n\n\n\n\n<p>Discount codes are submitted as <code>discounts.codes<\/code> inside the Cart and Checkout create\/update request bodies \u2014 no separate endpoint is needed.<\/p>\n\n<h4>Settings<\/h4>\n\n<p>Go to <strong>WooCommerce \u2192 UCP Enabler<\/strong> to configure:<\/p>\n\n<ul>\n<li><strong>General<\/strong> \u2014 UCP protocol version, API base endpoint (for proxied setups), profile cache TTL.<\/li>\n<li><strong>Capabilities<\/strong> \u2014 Toggle individual capabilities on or off using the switch controls. The Discount toggle is only effective when Cart or Checkout (or both) are also enabled.<\/li>\n<li><strong>Payment Handler<\/strong> \u2014 Configure a PSP tokenizer: token retrieval URL, public key, and accepted card brands.<\/li>\n<\/ul>\n\n<h4>Payment Processing<\/h4>\n\n<p>The plugin handles the UCP protocol layer and stores the payment token in WooCommerce order meta (<code>_ucp_payment_token<\/code>). The actual charge against your PSP is delegated via a WordPress filter, giving you full control:<\/p>\n\n<pre><code>php\nadd_filter( 'wbte_ucp_enabler_process_payment', function( $result, $order, $instrument, $credential ) {\n    \/\/ $credential['token'] is the PSP token sent by the agent.\n    \/\/ Call your payment gateway SDK here.\n    \/\/ On success: return null (or call $order-&gt;payment_complete($tx_id) first).\n    \/\/ On failure: return a WP_Error.\n    return null;\n}, 10, 4 );\n<\/code><\/pre>\n\n<h4>Cart Handoff<\/h4>\n\n<p>When an agent builds a cart for a human buyer to finish, the <code>continue_url<\/code> in the cart response is a one-time link that loads all items into the WooCommerce session and redirects to the WooCommerce cart page. The token is consumed on first use. Any discounts applied to the cart are preserved in the transient and will be visible in the response on subsequent GETs.<\/p>\n\n<h4>Item ID Convention<\/h4>\n\n<p>UCP uses a single string <code>item.id<\/code> to identify products. The plugin maps:\n* <code>\"123\"<\/code> \u2192 WooCommerce product ID 123\n* <code>\"123-456\"<\/code> \u2192 WooCommerce product 123, variation 456<\/p>\n\n<p>The catalog endpoint returns variation IDs in <code>\"{product_id}-{variation_id}\"<\/code> format so agents can reference them directly. Override with the <code>wbte_ucp_enabler_resolve_item_id<\/code> filter for custom slug-based IDs.<\/p>\n\n<h4>Extend the Profile<\/h4>\n\n<pre><code>php\nadd_filter( 'wbte_ucp_enabler_profile', function( $profile, $settings ) {\n    \/\/ Add signing_keys, custom extensions, etc.\n    return $profile;\n}, 10, 2 );\n<\/code><\/pre>\n\n<h3>External services<\/h3>\n\n<p>This plugin does not send any data to WebToffee or to any third party by itself. However, its entire purpose is to let external AI shopping agents (Google AI Mode, Gemini, ChatGPT, and others that implement the Universal Commerce Protocol) call your own store's REST API to browse your catalog and place orders \u2014 this section documents that data flow.<\/p>\n\n<p><strong>Universal Commerce Protocol (ucp.dev) schema references.<\/strong> The <code>\/.well-known\/ucp<\/code> profile and the plugin's REST responses embed several fixed URLs like <code>https:\/\/ucp.dev\/{version}\/schemas\/shopping\/checkout.json<\/code> and <code>https:\/\/ucp.dev\/{version}\/specification\/overview<\/code>. These are static links to the public UCP specification\/schema documentation, included so that any AI agent reading your profile knows which version of the protocol and JSON schema your store implements. Your server does not call these URLs at runtime and no store or customer data is ever sent to ucp.dev; the links are descriptive metadata only, and only the requesting agent (not this plugin) may choose to resolve them. ucp.dev is an open specification site (not a paid service) published under the Apache License 2.0.\nService: Universal Commerce Protocol specification (ucp.dev), an open standard maintained by the UCP Authors (Google, Shopify, and other industry partners) on GitHub.\nSpecification &amp; source: https:\/\/github.com\/Universal-Commerce-Protocol\/ucp\nLicense: https:\/\/github.com\/Universal-Commerce-Protocol\/ucp\/blob\/main\/LICENSE<\/p>\n\n<p><strong>Inbound requests from AI shopping agents.<\/strong> Once activated, this plugin exposes REST endpoints (catalog, cart, checkout, order) under <code>\/wp-json\/wt-ucp\/v1\/<\/code>. Any AI platform or agent that supports UCP can call these endpoints directly to search your catalog, build a cart, and complete checkout \u2014 this is the plugin's core function, not an optional integration. Catalog search\/lookup is open to any caller. Checkout-session and order operations beyond creation require the caller to present the session token issued at checkout creation (delivered via an <code>X-UCP-Session-Token<\/code> response header, and presented back as a standard <code>Authorization: Bearer &lt;token&gt;<\/code> header, per the UCP REST binding's own guidance on authenticating individual operations) \u2014 so an agent can only read or modify a session it created itself. No background or scheduled data transmission occurs; every exchange is a direct response to a request initiated by the agent. Which AI platforms can reach your store depends entirely on which agents or vendors you choose to make your <code>\/.well-known\/ucp<\/code> profile known to; this plugin does not register your store with, or transmit data to, any specific AI vendor on its own.<\/p>\n\n<p><strong>Optional payment handler \/ tokenizer.<\/strong> If you configure a Payment Handler under Settings, card\/payment data is tokenized by the handler you choose to configure. Consult that provider's own terms of service and privacy policy, as it is not bundled with or endorsed by this plugin.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>wt-ucp-enabler-for-woocommerce<\/code> folder to <code>\/wp-content\/plugins\/<\/code>.<\/li>\n<li>Activate through the <strong>Plugins<\/strong> screen in WordPress admin.<\/li>\n<li>Go to <strong>WooCommerce \u2192 UCP Enabler<\/strong> to review settings.<\/li>\n<li>Optionally enter your PSP tokenizer credentials under <strong>Payment Handler<\/strong>.<\/li>\n<li>Verify your profile is live at <code>https:\/\/yourstore.com\/.well-known\/ucp<\/code>.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20this%20work%20with%20woocommerce%20hpos%3F\"><h3>Does this work with WooCommerce HPOS?<\/h3><\/dt>\n<dd><p>Yes. The plugin declares full compatibility with WooCommerce High-Performance Order Storage (custom order tables).<\/p><\/dd>\n<dt id=\"which%20ucp%20spec%20version%20is%20implemented%3F\"><h3>Which UCP spec version is implemented?<\/h3><\/dt>\n<dd><p>Version <code>2026-04-08<\/code>. The version can be reviewed (and changed if needed) under <strong>WooCommerce \u2192 UCP Enabler \u2192 General<\/strong>.<\/p><\/dd>\n<dt id=\"can%20i%20disable%20individual%20capabilities%3F\"><h3>Can I disable individual capabilities?<\/h3><\/dt>\n<dd><p>Yes. Go to <strong>WooCommerce \u2192 UCP Enabler \u2192 Capabilities<\/strong> and toggle each one independently. Disabled capabilities are removed from the profile and return 404 on their endpoints. The Discount capability also silently no-ops if both Cart and Checkout are disabled.<\/p><\/dd>\n<dt id=\"which%20woocommerce%20coupon%20types%20are%20supported%20for%20discounts%3F\"><h3>Which WooCommerce coupon types are supported for discounts?<\/h3><\/dt>\n<dd><p>percent, <code>fixed_cart<\/code>, and <code>fixed_product<\/code>. Other coupon types introduced by WooCommerce extensions are skipped gracefully \u2014 the code is returned as rejected with an appropriate message rather than throwing an error.<\/p><\/dd>\n<dt id=\"the%20ai%20agent%20needs%20to%20charge%20a%20card%20%E2%80%94%20how%20does%20that%20work%3F\"><h3>The AI agent needs to charge a card \u2014 how does that work?<\/h3><\/dt>\n<dd><p>Configure your PSP tokenizer under the <strong>Payment Handler<\/strong> tab. The agent acquires a payment token directly from your PSP, then submits it to <code>POST \/checkout-sessions\/{id}\/complete<\/code>. Hook into <code>wbte_ucp_enabler_process_payment<\/code> to charge the token through your payment gateway.<\/p><\/dd>\n<dt id=\"my%20store%20is%20behind%20a%20reverse%20proxy%20%2F%20cdn%20%E2%80%94%20what%20do%20i%20need%20to%20change%3F\"><h3>My store is behind a reverse proxy \/ CDN \u2014 what do I need to change?<\/h3><\/dt>\n<dd><p>Update the <strong>API Base Endpoint<\/strong> field under <strong>General<\/strong> to the public-facing URL your proxy exposes. The profile will advertise that URL to agents while WordPress continues to serve the routes internally.<\/p><\/dd>\n<dt id=\"how%20do%20agents%20authenticate%20to%20read%20or%20change%20a%20checkout%20session%20or%20order%3F\"><h3>How do agents authenticate to read or change a checkout session or order?<\/h3><\/dt>\n<dd><p>POST \/checkout-sessions and catalog search are open to any caller, matching the UCP spec's own guidance that businesses \"MAY require authentication for some operations while leaving others open.\" Every other operation on a checkout session (<code>GET<\/code>, <code>PUT<\/code>, <code>...\/complete<\/code>, <code>...\/cancel<\/code>) and <code>GET \/orders\/{id}<\/code> requires the session token issued at creation time: it is returned in the <code>X-UCP-Session-Token<\/code> response header of the <code>POST \/checkout-sessions<\/code> call, and must be sent back as a standard <code>Authorization: Bearer &lt;token&gt;<\/code> header \u2014 the mechanism the UCP HTTP\/REST binding itself recommends \u2014 on every subsequent request for that session. This prevents one caller from reading or modifying another caller's checkout or order by guessing its id. Logged-in users with the <code>manage_woocommerce<\/code> capability (shop managers\/admins) can always access these endpoints without a token.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<li>Checkout capability: <code>POST \/checkout-sessions<\/code>, <code>GET<\/code>, <code>PUT<\/code>, <code>POST ...\/complete<\/code>, <code>POST ...\/cancel<\/code>. Non-creation operations on a checkout session, and <code>GET \/orders\/{id}<\/code>, require the session token issued at creation, presented as a standard <code>Authorization: Bearer &lt;token&gt;<\/code> header per the UCP HTTP\/REST binding's own guidance.<\/li>\n<li>Cart capability: session-based <code>POST \/carts<\/code>, <code>GET \/carts\/{id}<\/code>, <code>PUT \/carts\/{id}<\/code> with <code>continue_url<\/code> handoff; cart id is a 128-bit CSPRNG value.<\/li>\n<li>Order capability: <code>GET \/orders\/{id}<\/code>.<\/li>\n<li>Catalog capability: <code>GET \/catalog\/search<\/code>, <code>GET \/catalog\/items\/{id}<\/code>.<\/li>\n<li>Discount capability (<code>dev.ucp.shopping.discount<\/code>) extending Cart and\/or Checkout: coupon validation and application, per-line <code>items_discount<\/code> totals, <code>items_discount<\/code> vs <code>discount<\/code> order-level total types, automatic coupon detection, typed rejection messages, replacement semantics on every PUT.<\/li>\n<li>Discovery profile at <code>\/.well-known\/ucp<\/code> with <code>Cache-Control<\/code> headers per UCP spec.<\/li>\n<li>PSP tokenizer payment handler support with <code>wbte_ucp_enabler_process_payment<\/code> filter.<\/li>\n<li>Toggle switch UI for capability settings; pill-button UI for card brand selection.<\/li>\n<li>WooCommerce HPOS (custom order tables) compatibility declared.<\/li>\n<li>WooCommerce \u2192 UCP Enabler submenu page with General \/ Capabilities \/ Payment Handler tabs.<\/li>\n<li>Settings link added to the Plugins list table.<\/li>\n<\/ul>","raw_excerpt":"Make your WooCommerce store discoverable and purchasable by AI shopping agents through the Universal Commerce Protocol (UCP).","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/335249","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=335249"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/webtoffee"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=335249"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=335249"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=335249"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=335249"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=335249"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=335249"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}