🛒 WooCommerce UCP Implementation

Make your WordPress + WooCommerce store AI-ready. Enable ChatGPT, Google AI Mode, and autonomous shopping agents to transact with your products.

🤖 AI Agent Ready🔌 Plugin Required🔧 Developer Options🔒 Secure

What is UCP?

UCP (Universal Commerce Protocol) is the open standard created by Google and Shopify that lets AI shopping agents discover, browse, and buy from your store. It works by serving a JSON manifest at /.well-known/ucp on your domain, telling agents what your store sells, how to search products, and how to complete checkout.

When a customer asks ChatGPT "find me a blue wool sweater under $50," the AI agent reads your UCP profile to understand your catalog, browses your products via API, and can complete the purchase - all without the customer visiting your website directly. Learn more about how UCP works.

Why Add UCP to WooCommerce?

WooCommerce powers over 5 million online stores, but unlike Shopify (which added native UCP support), WooCommerce stores need manual setup to become AI-ready. Here is why it is worth the effort:

  • AI agents are the new search engines: Google AI Mode, ChatGPT Shopping, and Microsoft Copilot are sending buying-intent traffic directly to UCP-enabled stores. Stores without UCP are invisible to these agents.
  • WordPress flexibility: Full control over implementation via themes, plugins, or custom code - no platform lock-in
  • REST API ready: WooCommerce's REST API maps naturally to UCP's endpoint requirements for product search, cart, and checkout
  • Schema.org head start: If you use Yoast or Rank Math, your products likely already have the structured data that UCP builds on
  • Plugin ecosystem: Dedicated UCP plugins (UCP Connect, UCP Hub) make setup possible without coding
  • Both UCP and ACP coverage: WooCommerce can serve both UCP (Google/Shopify agents) and ACP (ChatGPT Shopping via Stripe) from the same store
⚠️ Important: UCP Requires Working API Endpoints

UCP is not just a static JSON file — it requires functional REST API endpoints that AI agents can interact with. For WooCommerce, this means installing a plugin that implements UCP-compatible endpoints, or building custom API integration.

🔌 Recommended: UCP Connect Plugin

The easiest way to add UCP support is with the UCP Connect for WooCommerce plugin, which handles both the UCP profile and the required API endpoints. Search "UCP Connect" in Plugins → Add New.

Implementation Methods

Choose the method that best fits your needs:

MethodDifficultyBest For
UCP Proxy (Shopify)MediumFull UCP checkout with AI agents (Recommended)
UCP Connect PluginEasyStore owners, non-developers
Manual (functions.php)AdvancedDevelopers building custom UCP API endpoints
Custom PluginExpertEnterprise with full UCP API implementation
💡 Note for Store Owners

If you're not a developer, the plugin method is your best option. For full AI agent checkout capabilities, consider the UCP Proxy method.

Method 1: UCP Proxy by Shopify (Recommended)

UCP Proxy is an open-source proxy by Shopify that enables full UCP checkout capabilities for WooCommerce stores. Your store remains the system-of-truth; the proxy translates UCP requests to WooCommerce API calls.

Why UCP Proxy?
  • Full checkout flow support (not just discovery)
  • Google Pay integration via Stripe
  • 3D Secure handling for secure payments
  • Stateless architecture — scales to zero
  • Official Shopify open-source project
1Prerequisites
  • WooCommerce 6.9+ (for Store API support)
  • WooCommerce REST API keys (Read/Write)
  • Optional: Stripe plugin for Google Pay
  • Go 1.21+ (for running the proxy)
2Clone and Configure
# Clone the repository
git clone https://github.com/Shopify/ucp-proxy
cd ucp-proxy

# Create config file
cp config.example.json config.local.json

Edit config.local.json:

{
  "port": "8080",
  "adapter_type": "woocommerce",
  "merchant_id": "my-store",
  "merchant": {
    "store_url": "https://yourstore.com",
    "api_key": "ck_your_consumer_key",
    "api_secret": "cs_your_consumer_secret",
    "policy_links": {
      "privacy_policy": "https://yourstore.com/privacy",
      "terms_of_service": "https://yourstore.com/terms"
    }
  }
}
3Run the Proxy
# Start the proxy
CONFIG_FILE=config.local.json go run ./cmd/proxy

# Test discovery endpoint
curl http://localhost:8080/.well-known/ucp
4Deploy to Production

Deploy to GCP Cloud Run, AWS, or any container hosting:

# GCP Cloud Run example
gcloud run deploy ucp-proxy \
  --source . \
  --region us-central1 \
  --allow-unauthenticated
💡 Full Documentation

See the WooCommerce setup guide for payment configuration, 3DS handling, and production deployment.

Method 2: Using UCP Connect Plugin

The UCP Connect plugin handles everything: it creates the UCP profile, implements the required API endpoints, and enables AI agent checkout capabilities.

1Install UCP Connect Plugin
  1. Go to Plugins → Add New in your WordPress admin
  2. Search for "UCP Connect" or "UCP WooCommerce"
  3. Click Install Now, then Activate
💡 Manual Installation

If the plugin isn't in the repository yet, download from UCP Connect for WooCommerce and upload via Plugins → Add New → Upload Plugin.

2Configure the Plugin
  1. Go to WooCommerce → Settings → UCP
  2. Enter your store details (most will be auto-filled from WooCommerce)
  3. Review capabilities to expose (browse, search, checkout)
  4. Click Save Changes
3Verify Installation

Visit https://yourstore.com/.well-known/ucp to see your generated UCP profile.

Validate Your WooCommerce Store

After installing the plugin, validate your UCP implementation.

Run Validation →

Method 3: Manual Implementation (Developers Only)

For full control, implement UCP manually using WordPress functions. This method is for developers who need custom UCP implementations.

⚠️ Developer Notice

This method only creates a basic UCP discovery profile. For full AI agent checkout capabilities, you must also implement UCP-compatible REST API endpoints that handle product queries, cart operations, and checkout flows. The code below is a starting point, not a complete UCP implementation.

1Generate Your UCP Profile

Generate Your UCP Profile

Create a customized UCP profile for your WooCommerce store.

Open Generator →
2Add Rewrite Rule

Add this code to your theme's functions.php or a custom plugin:

// Add rewrite rule for /.well-known/ucp
function ucp_add_rewrite_rules() {
    add_rewrite_rule(
        '^\.well-known/ucp/?$',
        'index.php?ucp_profile=1',
        'top'
    );
}
add_action('init', 'ucp_add_rewrite_rules');

// Register query var
function ucp_query_vars($vars) {
    $vars[] = 'ucp_profile';
    return $vars;
}
add_filter('query_vars', 'ucp_query_vars');
3Create the Response Handler
// Handle UCP profile request
function ucp_template_redirect() {
    if (get_query_var('ucp_profile')) {
        header('Content-Type: application/json');
        header('Access-Control-Allow-Origin: *');
        
        $profile = [
            'profile_version' => '1.0',
            'merchant' => [
                'name' => get_bloginfo('name'),
                'url' => home_url(),
                'description' => get_bloginfo('description'),
                'contact' => [
                    'email' => get_option('woocommerce_email_from_address')
                ]
            ],
            'capabilities' => ['browse', 'search'],
            'policies' => [
                'returns_url' => get_privacy_policy_url(),
                'shipping_url' => home_url('/shipping-policy/'),
                'privacy_url' => get_privacy_policy_url()
            ],
            'service_bindings' => [
                [
                    'type' => 'REST',
                    'base_url' => home_url('/wp-json/wc/v3')
                ]
            ]
        ];
        
        echo json_encode($profile, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
        exit;
    }
}
add_action('template_redirect', 'ucp_template_redirect');
4Flush Rewrite Rules

After adding the code, flush rewrite rules:

  1. Go to Settings → Permalinks
  2. Click Save Changes (no changes needed, just save)
⚠️ Important

Always flush rewrite rules after adding new rewrite rules. Failing to do so will result in 404 errors.

Schema.org Markup

For maximum AI compatibility, ensure your products have proper Schema.org markup. Many WooCommerce themes include this by default.

Recommended Plugins

  • Yoast SEO: Includes WooCommerce schema support
  • Rank Math: Advanced schema options for products
  • Schema Pro: Dedicated schema plugin

Verify your schema with:

Validate Your Implementation

Validate Your WooCommerce Store

Check your UCP implementation and AI commerce readiness.

Run Validation →

Common WooCommerce UCP Issues and Solutions

IssueSolution
404 on /.well-known/ucpFlush permalinks: Settings → Permalinks → Save. If using Nginx, add a location block for /.well-known/.
CORS errors from AI agentsAdd Access-Control-Allow-Origin: * header. Some security plugins (Wordfence, iThemes) block cross-origin requests - whitelist the UCP endpoint.
Wrong content typeEnsure Content-Type: application/json header. Some themes output HTML wrappers around JSON responses.
Caching returns stale profileExclude /.well-known/ucp from WP Super Cache, W3 Total Cache, LiteSpeed Cache, and Cloudflare page rules.
REST API disabled or blockedSome security plugins disable the WP REST API. Ensure /wp-json/wc/v3 is accessible. Test with curl https://yourstore.com/wp-json/wc/v3/products.
Missing profile_version fieldUCP requires a version field in YYYY-MM-DD format. Ensure your plugin or manual implementation includes it.
HTTP endpoints (not HTTPS)UCP requires all endpoints to use HTTPS. Install an SSL certificate and force HTTPS redirects in WordPress Settings → General.
Trailing slashes on endpoint URLsUCP spec requires no trailing slash on endpoint URLs. Check your service_bindings base URL.

Still Seeing Errors?

Run the free UCPtools validator to get specific error codes with fix suggestions for your WooCommerce store.

Validate Your Store →

After Setup: What to Expect

Once your WooCommerce UCP profile is live and validated:

  1. AI agent discovery (1-7 days): Google and other crawlers will discover your /.well-known/ucp endpoint. You can speed this up by submitting your URL in Google Search Console.
  2. Agent interactions begin: You will start seeing AI agent traffic in your server logs. Look for user agents containing "GPTBot", "Google-Extended", "Amazonbot", or "PerplexityBot".
  3. Monitor with analytics: Track AI agent visits with UCPtools AI Agent Analytics to see which agents discover your products and how they interact with your store.
  4. Keep your profile current: Update your UCP profile when you change store policies, add capabilities, or update product categories. Stale profiles reduce AI agent trust.

🤖 Test with AI Agents

Run AI Agent Simulation

Test how AI shopping agents will interact with your WooCommerce store.

Open Simulator →

Frequently Asked Questions

Does WooCommerce support UCP natively?

No. Unlike Shopify, WooCommerce does not include built-in UCP support. You need to install a plugin like UCP Connect or deploy the open-source UCP Proxy by Shopify to add UCP to your WordPress store.

What is the easiest way to add UCP to WooCommerce?

The easiest method is installing the UCP Connect plugin from the WordPress plugin repository. It auto-generates your UCP profile and creates the required API endpoints. For full AI agent checkout, the Shopify UCP Proxy is recommended.

Will UCP work with my existing WooCommerce plugins?

UCP relies on the WooCommerce REST API. Plugins that modify product data, pricing, or tax calculations must be compatible with the REST API to be accessible via UCP. Most popular plugins (Yoast, Rank Math, WooCommerce Subscriptions) are compatible.

What is the difference between UCP and ACP for WooCommerce?

UCP (Universal Commerce Protocol) is used by Google AI Mode and Shopify-powered agents. ACP (Agentic Commerce Protocol) is used by ChatGPT Shopping via OpenAI and Stripe. For full AI readiness, your WooCommerce store should support both. UCPtools checks both protocols.

How do I test if my WooCommerce UCP setup is working?

Visit yourstore.com/.well-known/ucp to check the raw profile. Then use the free UCPtools validator at ucptools.dev to run 4-level validation: structural checks, UCP compliance rules, network verification, and AI agent simulation.

Does UCP affect my WooCommerce store performance?

No. UCP is a lightweight JSON manifest served at a single endpoint. It does not add JavaScript, CSS, or database queries to your storefront. AI agent API calls go through the WooCommerce REST API, which is already optimized for external access.

Resources