@ucptools/validator 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/config.d.ts +20 -0
- package/dist/auth/config.d.ts.map +1 -0
- package/dist/auth/config.js +114 -0
- package/dist/auth/config.js.map +1 -0
- package/dist/auth/index.d.ts +5 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +17 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/middleware.d.ts +45 -0
- package/dist/auth/middleware.d.ts.map +1 -0
- package/dist/auth/middleware.js +170 -0
- package/dist/auth/middleware.js.map +1 -0
- package/dist/auth/service.d.ts +80 -0
- package/dist/auth/service.d.ts.map +1 -0
- package/dist/auth/service.js +298 -0
- package/dist/auth/service.js.map +1 -0
- package/dist/cli/index.d.ts +6 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +375 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/mock-server.d.ts +20 -0
- package/dist/cli/mock-server.d.ts.map +1 -0
- package/dist/cli/mock-server.js +261 -0
- package/dist/cli/mock-server.js.map +1 -0
- package/dist/compliance/compliance-generator.d.ts +34 -0
- package/dist/compliance/compliance-generator.d.ts.map +1 -0
- package/dist/compliance/compliance-generator.js +320 -0
- package/dist/compliance/compliance-generator.js.map +1 -0
- package/dist/compliance/index.d.ts +8 -0
- package/dist/compliance/index.d.ts.map +1 -0
- package/dist/compliance/index.js +17 -0
- package/dist/compliance/index.js.map +1 -0
- package/dist/compliance/templates.d.ts +34 -0
- package/dist/compliance/templates.d.ts.map +1 -0
- package/{src/compliance/templates.ts → dist/compliance/templates.js} +117 -155
- package/dist/compliance/templates.js.map +1 -0
- package/dist/compliance/types.d.ts +64 -0
- package/dist/compliance/types.d.ts.map +1 -0
- package/dist/compliance/types.js +64 -0
- package/dist/compliance/types.js.map +1 -0
- package/dist/db/index.d.ts +17 -0
- package/dist/db/index.d.ts.map +1 -0
- package/dist/db/index.js +80 -0
- package/dist/db/index.js.map +1 -0
- package/dist/db/schema.d.ts +3886 -0
- package/dist/db/schema.d.ts.map +1 -0
- package/dist/db/schema.js +425 -0
- package/dist/db/schema.js.map +1 -0
- package/dist/db/utils.d.ts +252 -0
- package/dist/db/utils.d.ts.map +1 -0
- package/dist/db/utils.js +295 -0
- package/dist/db/utils.js.map +1 -0
- package/dist/feed-analyzer/feed-analyzer.d.ts +26 -0
- package/dist/feed-analyzer/feed-analyzer.d.ts.map +1 -0
- package/{src/feed-analyzer/feed-analyzer.ts → dist/feed-analyzer/feed-analyzer.js} +856 -726
- package/dist/feed-analyzer/feed-analyzer.js.map +1 -0
- package/dist/feed-analyzer/index.d.ts +8 -0
- package/dist/feed-analyzer/index.d.ts.map +1 -0
- package/dist/feed-analyzer/index.js +19 -0
- package/dist/feed-analyzer/index.js.map +1 -0
- package/dist/feed-analyzer/types.d.ts +285 -0
- package/dist/feed-analyzer/types.d.ts.map +1 -0
- package/dist/feed-analyzer/types.js +175 -0
- package/dist/feed-analyzer/types.js.map +1 -0
- package/{src/generator/index.ts → dist/generator/index.d.ts} +1 -1
- package/dist/generator/index.d.ts.map +1 -0
- package/dist/generator/index.js +13 -0
- package/dist/generator/index.js.map +1 -0
- package/dist/generator/key-generator.d.ts +24 -0
- package/dist/generator/key-generator.d.ts.map +1 -0
- package/dist/generator/key-generator.js +144 -0
- package/dist/generator/key-generator.js.map +1 -0
- package/dist/generator/profile-builder.d.ts +15 -0
- package/dist/generator/profile-builder.d.ts.map +1 -0
- package/dist/generator/profile-builder.js +338 -0
- package/dist/generator/profile-builder.js.map +1 -0
- package/dist/hosting/artifacts-generator.d.ts +10 -0
- package/dist/hosting/artifacts-generator.d.ts.map +1 -0
- package/{src/hosting/artifacts-generator.ts → dist/hosting/artifacts-generator.js} +191 -241
- package/dist/hosting/artifacts-generator.js.map +1 -0
- package/{src/hosting/index.ts → dist/hosting/index.d.ts} +1 -1
- package/dist/hosting/index.d.ts.map +1 -0
- package/dist/hosting/index.js +10 -0
- package/dist/hosting/index.js.map +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +78 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/analytics.d.ts +337 -0
- package/dist/lib/analytics.d.ts.map +1 -0
- package/dist/lib/analytics.js +188 -0
- package/dist/lib/analytics.js.map +1 -0
- package/{src/security/index.ts → dist/security/index.d.ts} +8 -15
- package/dist/security/index.d.ts.map +1 -0
- package/dist/security/index.js +12 -0
- package/dist/security/index.js.map +1 -0
- package/dist/security/security-scanner.d.ts +10 -0
- package/dist/security/security-scanner.d.ts.map +1 -0
- package/dist/security/security-scanner.js +669 -0
- package/dist/security/security-scanner.js.map +1 -0
- package/dist/security/types.d.ts +80 -0
- package/dist/security/types.d.ts.map +1 -0
- package/dist/security/types.js +21 -0
- package/dist/security/types.js.map +1 -0
- package/dist/services/analytics.d.ts +114 -0
- package/dist/services/analytics.d.ts.map +1 -0
- package/dist/services/analytics.js +862 -0
- package/dist/services/analytics.js.map +1 -0
- package/dist/services/badge.d.ts +31 -0
- package/dist/services/badge.d.ts.map +1 -0
- package/dist/services/badge.js +152 -0
- package/dist/services/badge.js.map +1 -0
- package/dist/services/cron.d.ts +125 -0
- package/dist/services/cron.d.ts.map +1 -0
- package/dist/services/cron.js +613 -0
- package/dist/services/cron.js.map +1 -0
- package/dist/services/directory.d.ts +106 -0
- package/dist/services/directory.d.ts.map +1 -0
- package/dist/services/directory.js +351 -0
- package/dist/services/directory.js.map +1 -0
- package/dist/services/email.d.ts +112 -0
- package/dist/services/email.d.ts.map +1 -0
- package/dist/services/email.js +772 -0
- package/dist/services/email.js.map +1 -0
- package/dist/services/hosted-profiles.d.ts +77 -0
- package/dist/services/hosted-profiles.d.ts.map +1 -0
- package/dist/services/hosted-profiles.js +433 -0
- package/dist/services/hosted-profiles.js.map +1 -0
- package/dist/services/latency.d.ts +67 -0
- package/dist/services/latency.d.ts.map +1 -0
- package/dist/services/latency.js +274 -0
- package/dist/services/latency.js.map +1 -0
- package/dist/services/manifest-compliance.d.ts +64 -0
- package/dist/services/manifest-compliance.d.ts.map +1 -0
- package/dist/services/manifest-compliance.js +271 -0
- package/dist/services/manifest-compliance.js.map +1 -0
- package/dist/services/monitoring-diff.d.ts +31 -0
- package/dist/services/monitoring-diff.d.ts.map +1 -0
- package/dist/services/monitoring-diff.js +189 -0
- package/dist/services/monitoring-diff.js.map +1 -0
- package/dist/services/notifications.d.ts +46 -0
- package/dist/services/notifications.d.ts.map +1 -0
- package/dist/services/notifications.js +88 -0
- package/dist/services/notifications.js.map +1 -0
- package/dist/services/stripe.d.ts +93 -0
- package/dist/services/stripe.d.ts.map +1 -0
- package/dist/services/stripe.js +490 -0
- package/dist/services/stripe.js.map +1 -0
- package/dist/services/validation-history.d.ts +99 -0
- package/dist/services/validation-history.d.ts.map +1 -0
- package/dist/services/validation-history.js +344 -0
- package/dist/services/validation-history.js.map +1 -0
- package/dist/services/validation-logging.d.ts +103 -0
- package/dist/services/validation-logging.d.ts.map +1 -0
- package/dist/services/validation-logging.js +210 -0
- package/dist/services/validation-logging.js.map +1 -0
- package/dist/services/validation.d.ts +119 -0
- package/dist/services/validation.d.ts.map +1 -0
- package/dist/services/validation.js +1185 -0
- package/dist/services/validation.js.map +1 -0
- package/dist/simulator/agent-simulator.d.ts +69 -0
- package/dist/simulator/agent-simulator.d.ts.map +1 -0
- package/dist/simulator/agent-simulator.js +870 -0
- package/dist/simulator/agent-simulator.js.map +1 -0
- package/{src/simulator/index.ts → dist/simulator/index.d.ts} +7 -7
- package/dist/simulator/index.d.ts.map +1 -0
- package/dist/simulator/index.js +23 -0
- package/dist/simulator/index.js.map +1 -0
- package/{src/simulator/types.ts → dist/simulator/types.d.ts} +171 -170
- package/dist/simulator/types.d.ts.map +1 -0
- package/dist/simulator/types.js +18 -0
- package/dist/simulator/types.js.map +1 -0
- package/dist/types/acp-validation.d.ts +87 -0
- package/dist/types/acp-validation.d.ts.map +1 -0
- package/dist/types/acp-validation.js +40 -0
- package/dist/types/acp-validation.js.map +1 -0
- package/dist/types/analytics.d.ts +182 -0
- package/dist/types/analytics.d.ts.map +1 -0
- package/dist/types/analytics.js +7 -0
- package/dist/types/analytics.js.map +1 -0
- package/dist/types/generator.d.ts +106 -0
- package/dist/types/generator.d.ts.map +1 -0
- package/dist/types/generator.js +6 -0
- package/dist/types/generator.js.map +1 -0
- package/{src/types/index.ts → dist/types/index.d.ts} +1 -1
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +23 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/ucp-profile.d.ts +111 -0
- package/dist/types/ucp-profile.d.ts.map +1 -0
- package/dist/types/ucp-profile.js +45 -0
- package/dist/types/ucp-profile.js.map +1 -0
- package/dist/types/validation.d.ts +76 -0
- package/dist/types/validation.d.ts.map +1 -0
- package/dist/types/validation.js +42 -0
- package/dist/types/validation.js.map +1 -0
- package/dist/validator/acp/index.d.ts +31 -0
- package/dist/validator/acp/index.d.ts.map +1 -0
- package/dist/validator/acp/index.js +574 -0
- package/dist/validator/acp/index.js.map +1 -0
- package/dist/validator/index.d.ts +26 -0
- package/dist/validator/index.d.ts.map +1 -0
- package/dist/validator/index.js +161 -0
- package/dist/validator/index.js.map +1 -0
- package/dist/validator/network-validator.d.ts +28 -0
- package/dist/validator/network-validator.d.ts.map +1 -0
- package/dist/validator/network-validator.js +319 -0
- package/dist/validator/network-validator.js.map +1 -0
- package/dist/validator/rules-validator.d.ts +19 -0
- package/dist/validator/rules-validator.d.ts.map +1 -0
- package/dist/validator/rules-validator.js +306 -0
- package/dist/validator/rules-validator.js.map +1 -0
- package/dist/validator/sdk-validator.d.ts +58 -0
- package/dist/validator/sdk-validator.d.ts.map +1 -0
- package/{src/validator/sdk-validator.ts → dist/validator/sdk-validator.js} +273 -330
- package/dist/validator/sdk-validator.js.map +1 -0
- package/dist/validator/structural-validator.d.ts +11 -0
- package/dist/validator/structural-validator.d.ts.map +1 -0
- package/dist/validator/structural-validator.js +549 -0
- package/dist/validator/structural-validator.js.map +1 -0
- package/dist/validator/utils.d.ts +51 -0
- package/dist/validator/utils.d.ts.map +1 -0
- package/dist/validator/utils.js +132 -0
- package/dist/validator/utils.js.map +1 -0
- package/package.json +44 -12
- package/CLAUDE.md +0 -109
- package/api/analyze-feed.js +0 -140
- package/api/badge.js +0 -185
- package/api/benchmark.js +0 -177
- package/api/directory-stats.ts +0 -29
- package/api/directory.ts +0 -73
- package/api/generate-compliance.js +0 -143
- package/api/generate-schema.js +0 -457
- package/api/generate.js +0 -132
- package/api/security-scan.js +0 -133
- package/api/simulate.js +0 -187
- package/api/tsconfig.json +0 -10
- package/api/validate.js +0 -1351
- package/apify-actor/.actor/actor.json +0 -68
- package/apify-actor/.actor/input_schema.json +0 -32
- package/apify-actor/APIFY-STORE-LISTING.md +0 -412
- package/apify-actor/Dockerfile +0 -8
- package/apify-actor/README.md +0 -166
- package/apify-actor/main.ts +0 -111
- package/apify-actor/package.json +0 -17
- package/apify-actor/src/main.js +0 -199
- package/docs/BRAND-IDENTITY.md +0 -238
- package/docs/BRAND-STYLE-GUIDE.md +0 -356
- package/drizzle/0000_black_king_cobra.sql +0 -39
- package/drizzle/meta/0000_snapshot.json +0 -309
- package/drizzle/meta/_journal.json +0 -13
- package/drizzle.config.ts +0 -10
- package/public/.well-known/ucp +0 -25
- package/public/android-chrome-192x192.png +0 -0
- package/public/android-chrome-512x512.png +0 -0
- package/public/apple-touch-icon.png +0 -0
- package/public/brand.css +0 -321
- package/public/directory.html +0 -701
- package/public/favicon-16x16.png +0 -0
- package/public/favicon-32x32.png +0 -0
- package/public/favicon.ico +0 -0
- package/public/guides/bigcommerce.html +0 -743
- package/public/guides/fastucp.html +0 -838
- package/public/guides/magento.html +0 -779
- package/public/guides/shopify.html +0 -726
- package/public/guides/squarespace.html +0 -749
- package/public/guides/wix.html +0 -747
- package/public/guides/woocommerce.html +0 -733
- package/public/index.html +0 -3835
- package/public/learn.html +0 -396
- package/public/logo.jpeg +0 -0
- package/public/og-image-icon.png +0 -0
- package/public/og-image.png +0 -0
- package/public/robots.txt +0 -6
- package/public/site.webmanifest +0 -31
- package/public/sitemap.xml +0 -69
- package/public/social/linkedin-banner-1128x191.png +0 -0
- package/public/social/temp.PNG +0 -0
- package/public/social/x-header-1500x500.png +0 -0
- package/public/verify.html +0 -410
- package/scripts/generate-favicons.js +0 -44
- package/scripts/generate-ico.js +0 -23
- package/scripts/generate-og-image.js +0 -45
- package/scripts/reset-db.ts +0 -77
- package/scripts/seed-db.ts +0 -71
- package/scripts/setup-benchmark-db.js +0 -70
- package/src/api/server.ts +0 -266
- package/src/cli/index.ts +0 -302
- package/src/compliance/compliance-generator.ts +0 -452
- package/src/compliance/index.ts +0 -28
- package/src/compliance/types.ts +0 -170
- package/src/db/index.ts +0 -28
- package/src/db/schema.ts +0 -84
- package/src/feed-analyzer/index.ts +0 -34
- package/src/feed-analyzer/types.ts +0 -354
- package/src/generator/key-generator.ts +0 -124
- package/src/generator/profile-builder.ts +0 -402
- package/src/index.ts +0 -105
- package/src/security/security-scanner.ts +0 -604
- package/src/security/types.ts +0 -55
- package/src/services/directory.ts +0 -434
- package/src/simulator/agent-simulator.ts +0 -941
- package/src/types/generator.ts +0 -140
- package/src/types/ucp-profile.ts +0 -140
- package/src/types/validation.ts +0 -89
- package/src/validator/index.ts +0 -194
- package/src/validator/network-validator.ts +0 -417
- package/src/validator/rules-validator.ts +0 -297
- package/src/validator/structural-validator.ts +0 -476
- package/tests/fixtures/non-compliant-profile.json +0 -25
- package/tests/fixtures/official-sample-profile.json +0 -75
- package/tests/integration/benchmark.test.ts +0 -207
- package/tests/integration/database.test.ts +0 -163
- package/tests/integration/directory-api.test.ts +0 -268
- package/tests/integration/simulate-api.test.ts +0 -230
- package/tests/integration/validate-api.test.ts +0 -269
- package/tests/setup.ts +0 -15
- package/tests/unit/agent-simulator.test.ts +0 -575
- package/tests/unit/compliance-generator.test.ts +0 -374
- package/tests/unit/directory-service.test.ts +0 -272
- package/tests/unit/feed-analyzer.test.ts +0 -517
- package/tests/unit/lint-suggestions.test.ts +0 -423
- package/tests/unit/official-samples.test.ts +0 -211
- package/tests/unit/pdf-report.test.ts +0 -390
- package/tests/unit/sdk-validator.test.ts +0 -531
- package/tests/unit/security-scanner.test.ts +0 -410
- package/tests/unit/validation.test.ts +0 -390
- package/tsconfig.json +0 -20
- package/vercel.json +0 -34
- package/vitest.config.ts +0 -22
|
@@ -1,733 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
|
|
4
|
-
<head>
|
|
5
|
-
<!-- Google Analytics -->
|
|
6
|
-
<script async src="https://www.googletagmanager.com/gtag/js?id=G-J5JSHV7H1E"></script>
|
|
7
|
-
<script>
|
|
8
|
-
window.dataLayer = window.dataLayer || [];
|
|
9
|
-
function gtag() { dataLayer.push(arguments); }
|
|
10
|
-
gtag('js', new Date());
|
|
11
|
-
gtag('config', 'G-J5JSHV7H1E');
|
|
12
|
-
</script>
|
|
13
|
-
<meta charset="UTF-8">
|
|
14
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
15
|
-
<title>WooCommerce UCP Implementation Guide - AI Commerce Ready | UCP Tools</title>
|
|
16
|
-
<meta name="description"
|
|
17
|
-
content="Step-by-step guide to implementing UCP (Universal Commerce Protocol) on your WooCommerce store. Make your WordPress store AI-ready for ChatGPT and AI shopping agents.">
|
|
18
|
-
<link rel="canonical" href="https://ucptools.dev/guides/woocommerce">
|
|
19
|
-
<link rel="icon" type="image/x-icon" href="/favicon.ico">
|
|
20
|
-
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
|
|
21
|
-
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
|
|
22
|
-
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
|
|
23
|
-
<link rel="manifest" href="/site.webmanifest">
|
|
24
|
-
<meta name="theme-color" content="#9B5C8F">
|
|
25
|
-
<meta property="og:title" content="WooCommerce UCP Implementation Guide - AI Commerce Ready">
|
|
26
|
-
<meta property="og:description"
|
|
27
|
-
content="Make your WooCommerce store AI-ready with UCP. Complete WordPress implementation guide.">
|
|
28
|
-
<meta property="og:image" content="/og-image.png">
|
|
29
|
-
<meta property="og:type" content="article">
|
|
30
|
-
|
|
31
|
-
<!-- Google Fonts -->
|
|
32
|
-
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
33
|
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
34
|
-
<link
|
|
35
|
-
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Fira+Code:wght@400;500&display=swap"
|
|
36
|
-
rel="stylesheet">
|
|
37
|
-
|
|
38
|
-
<style>
|
|
39
|
-
:root {
|
|
40
|
-
--brand-blue: #2E86AB;
|
|
41
|
-
--brand-teal: #36B5A2;
|
|
42
|
-
--brand-green: #47C97A;
|
|
43
|
-
--brand-gradient: linear-gradient(135deg, #2E86AB 0%, #36B5A2 50%, #47C97A 100%);
|
|
44
|
-
--platform-color: #9B5C8F;
|
|
45
|
-
--platform-dark: #7F4275;
|
|
46
|
-
--color-dark: #1A2B3C;
|
|
47
|
-
--color-medium: #5A6978;
|
|
48
|
-
--color-light: #94A3B8;
|
|
49
|
-
--color-border: #E2E8F0;
|
|
50
|
-
--color-background: #F8FAFC;
|
|
51
|
-
--color-card: #FFFFFF;
|
|
52
|
-
--color-success: #47C97A;
|
|
53
|
-
--color-warning: #F59E0B;
|
|
54
|
-
--color-error: #EF4444;
|
|
55
|
-
--color-info: #2E86AB;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
59
|
-
|
|
60
|
-
body {
|
|
61
|
-
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
62
|
-
background: var(--color-background);
|
|
63
|
-
color: var(--color-dark);
|
|
64
|
-
line-height: 1.6;
|
|
65
|
-
min-height: 100vh;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
a { color: var(--brand-blue); text-decoration: none; }
|
|
69
|
-
a:hover { text-decoration: underline; }
|
|
70
|
-
|
|
71
|
-
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
|
|
72
|
-
|
|
73
|
-
header {
|
|
74
|
-
background: var(--color-card);
|
|
75
|
-
border-bottom: 1px solid var(--color-border);
|
|
76
|
-
padding: 16px 0;
|
|
77
|
-
position: sticky;
|
|
78
|
-
top: 0;
|
|
79
|
-
z-index: 1000;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.header-inner {
|
|
83
|
-
display: flex;
|
|
84
|
-
justify-content: space-between;
|
|
85
|
-
align-items: center;
|
|
86
|
-
max-width: 1200px;
|
|
87
|
-
margin: 0 auto;
|
|
88
|
-
padding: 0 20px;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.logo {
|
|
92
|
-
display: flex;
|
|
93
|
-
align-items: center;
|
|
94
|
-
gap: 12px;
|
|
95
|
-
font-size: 24px;
|
|
96
|
-
font-weight: 700;
|
|
97
|
-
text-decoration: none;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.logo:hover { text-decoration: none; }
|
|
101
|
-
.logo-icon { width: 40px; height: 40px; border-radius: 8px; }
|
|
102
|
-
|
|
103
|
-
.logo-text {
|
|
104
|
-
background: var(--brand-gradient);
|
|
105
|
-
-webkit-background-clip: text;
|
|
106
|
-
-webkit-text-fill-color: transparent;
|
|
107
|
-
background-clip: text;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.logo-suffix { font-weight: 400; -webkit-text-fill-color: var(--color-medium); }
|
|
111
|
-
|
|
112
|
-
nav { display: flex; gap: 8px; }
|
|
113
|
-
|
|
114
|
-
nav a {
|
|
115
|
-
padding: 8px 16px;
|
|
116
|
-
color: var(--color-medium);
|
|
117
|
-
text-decoration: none;
|
|
118
|
-
font-weight: 500;
|
|
119
|
-
border-radius: 6px;
|
|
120
|
-
transition: all 0.2s;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
nav a:hover {
|
|
124
|
-
color: var(--brand-blue);
|
|
125
|
-
background: rgba(46, 134, 171, 0.08);
|
|
126
|
-
text-decoration: none;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
nav a.active {
|
|
130
|
-
color: var(--brand-blue);
|
|
131
|
-
background: rgba(46, 134, 171, 0.12);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.guide-hero {
|
|
135
|
-
background: linear-gradient(135deg, #7F4275 0%, #9B5C8F 100%);
|
|
136
|
-
color: white;
|
|
137
|
-
padding: 80px 0;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.guide-hero .container { max-width: 800px; }
|
|
141
|
-
|
|
142
|
-
.guide-hero h1 {
|
|
143
|
-
font-size: 2.75rem;
|
|
144
|
-
font-weight: 700;
|
|
145
|
-
margin-bottom: 16px;
|
|
146
|
-
line-height: 1.2;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.guide-hero p {
|
|
150
|
-
font-size: 1.25rem;
|
|
151
|
-
opacity: 0.9;
|
|
152
|
-
line-height: 1.6;
|
|
153
|
-
margin-bottom: 24px;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.guide-badges { display: flex; gap: 12px; flex-wrap: wrap; }
|
|
157
|
-
|
|
158
|
-
.guide-badge {
|
|
159
|
-
background: rgba(255, 255, 255, 0.15);
|
|
160
|
-
backdrop-filter: blur(10px);
|
|
161
|
-
padding: 8px 16px;
|
|
162
|
-
border-radius: 24px;
|
|
163
|
-
font-size: 0.9rem;
|
|
164
|
-
font-weight: 500;
|
|
165
|
-
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.guide-content {
|
|
169
|
-
display: grid;
|
|
170
|
-
grid-template-columns: 1fr 260px;
|
|
171
|
-
gap: 60px;
|
|
172
|
-
max-width: 1100px;
|
|
173
|
-
margin: 0 auto;
|
|
174
|
-
padding: 60px 20px;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
@media (max-width: 968px) {
|
|
178
|
-
.guide-content { grid-template-columns: 1fr; gap: 40px; }
|
|
179
|
-
.guide-sidebar { order: -1; }
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
@media (max-width: 600px) {
|
|
183
|
-
.guide-hero h1 { font-size: 2rem; }
|
|
184
|
-
.guide-hero p { font-size: 1.1rem; }
|
|
185
|
-
.header-inner { flex-direction: column; gap: 16px; }
|
|
186
|
-
nav { flex-wrap: wrap; justify-content: center; }
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
.guide-main section { margin-bottom: 48px; }
|
|
190
|
-
|
|
191
|
-
.guide-main h2 {
|
|
192
|
-
color: var(--color-dark);
|
|
193
|
-
font-size: 1.75rem;
|
|
194
|
-
font-weight: 700;
|
|
195
|
-
margin-bottom: 20px;
|
|
196
|
-
padding-bottom: 12px;
|
|
197
|
-
border-bottom: 2px solid var(--color-border);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
.guide-main h3 {
|
|
201
|
-
font-size: 1.25rem;
|
|
202
|
-
font-weight: 600;
|
|
203
|
-
margin: 32px 0 16px;
|
|
204
|
-
color: var(--color-dark);
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.guide-main p {
|
|
208
|
-
margin-bottom: 16px;
|
|
209
|
-
color: var(--color-medium);
|
|
210
|
-
font-size: 1.05rem;
|
|
211
|
-
line-height: 1.7;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.guide-main ul, .guide-main ol { margin-bottom: 20px; padding-left: 24px; }
|
|
215
|
-
|
|
216
|
-
.guide-main li {
|
|
217
|
-
margin-bottom: 10px;
|
|
218
|
-
color: var(--color-medium);
|
|
219
|
-
line-height: 1.6;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
.guide-main li strong { color: var(--color-dark); }
|
|
223
|
-
|
|
224
|
-
pre {
|
|
225
|
-
background: #1e1e1e;
|
|
226
|
-
color: #d4d4d4;
|
|
227
|
-
padding: 24px;
|
|
228
|
-
border-radius: 12px;
|
|
229
|
-
overflow-x: auto;
|
|
230
|
-
margin: 20px 0;
|
|
231
|
-
font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
|
|
232
|
-
font-size: 0.9rem;
|
|
233
|
-
line-height: 1.6;
|
|
234
|
-
border: 1px solid #333;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
code { font-family: 'Fira Code', 'Monaco', 'Consolas', monospace; }
|
|
238
|
-
|
|
239
|
-
:not(pre)>code {
|
|
240
|
-
background: #EEF2F6;
|
|
241
|
-
padding: 3px 8px;
|
|
242
|
-
border-radius: 6px;
|
|
243
|
-
font-size: 0.9em;
|
|
244
|
-
color: var(--platform-dark);
|
|
245
|
-
font-weight: 500;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
.step-number {
|
|
249
|
-
display: inline-flex;
|
|
250
|
-
align-items: center;
|
|
251
|
-
justify-content: center;
|
|
252
|
-
width: 32px;
|
|
253
|
-
height: 32px;
|
|
254
|
-
background: var(--platform-color);
|
|
255
|
-
color: white;
|
|
256
|
-
border-radius: 50%;
|
|
257
|
-
font-weight: 700;
|
|
258
|
-
font-size: 0.9rem;
|
|
259
|
-
margin-right: 12px;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
.step-title {
|
|
263
|
-
display: flex;
|
|
264
|
-
align-items: center;
|
|
265
|
-
font-size: 1.25rem;
|
|
266
|
-
font-weight: 600;
|
|
267
|
-
margin: 32px 0 16px;
|
|
268
|
-
color: var(--color-dark);
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
.tip-box {
|
|
272
|
-
background: #EFF6FF;
|
|
273
|
-
border-left: 4px solid var(--brand-blue);
|
|
274
|
-
padding: 20px 24px;
|
|
275
|
-
border-radius: 0 12px 12px 0;
|
|
276
|
-
margin: 24px 0;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
.tip-box.warning { background: #FEF3C7; border-color: var(--color-warning); }
|
|
280
|
-
.tip-box.success { background: #DCFCE7; border-color: var(--color-success); }
|
|
281
|
-
.tip-box.platform { background: #F5EEF4; border-color: var(--platform-color); }
|
|
282
|
-
|
|
283
|
-
.tip-box strong {
|
|
284
|
-
display: block;
|
|
285
|
-
margin-bottom: 6px;
|
|
286
|
-
color: var(--color-dark);
|
|
287
|
-
font-size: 1rem;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
.tip-box p, .tip-box { color: var(--color-medium); font-size: 0.95rem; }
|
|
291
|
-
|
|
292
|
-
.cta-box {
|
|
293
|
-
background: var(--brand-gradient);
|
|
294
|
-
color: white;
|
|
295
|
-
padding: 40px;
|
|
296
|
-
border-radius: 16px;
|
|
297
|
-
text-align: center;
|
|
298
|
-
margin: 32px 0;
|
|
299
|
-
box-shadow: 0 8px 32px rgba(46, 134, 171, 0.25);
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
.cta-box h3 { color: white; font-size: 1.5rem; margin-bottom: 12px; }
|
|
303
|
-
.cta-box p { color: rgba(255, 255, 255, 0.9); margin-bottom: 24px; font-size: 1.05rem; }
|
|
304
|
-
|
|
305
|
-
.cta-box .btn {
|
|
306
|
-
background: white;
|
|
307
|
-
color: var(--brand-blue);
|
|
308
|
-
padding: 14px 32px;
|
|
309
|
-
border-radius: 8px;
|
|
310
|
-
text-decoration: none;
|
|
311
|
-
font-weight: 600;
|
|
312
|
-
font-size: 1rem;
|
|
313
|
-
display: inline-block;
|
|
314
|
-
transition: all 0.2s;
|
|
315
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
.cta-box .btn:hover {
|
|
319
|
-
transform: translateY(-2px);
|
|
320
|
-
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
|
|
321
|
-
text-decoration: none;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
table {
|
|
325
|
-
width: 100%;
|
|
326
|
-
border-collapse: collapse;
|
|
327
|
-
margin: 20px 0;
|
|
328
|
-
background: var(--color-card);
|
|
329
|
-
border-radius: 12px;
|
|
330
|
-
overflow: hidden;
|
|
331
|
-
border: 1px solid var(--color-border);
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
th, td {
|
|
335
|
-
text-align: left;
|
|
336
|
-
padding: 16px 20px;
|
|
337
|
-
border-bottom: 1px solid var(--color-border);
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
th { background: var(--color-background); font-weight: 600; color: var(--color-dark); }
|
|
341
|
-
tr:last-child td { border-bottom: none; }
|
|
342
|
-
td code { background: #EEF2F6; padding: 4px 8px; border-radius: 4px; }
|
|
343
|
-
|
|
344
|
-
.guide-sidebar { position: sticky; top: 100px; align-self: start; }
|
|
345
|
-
|
|
346
|
-
.sidebar-toc {
|
|
347
|
-
background: var(--color-card);
|
|
348
|
-
border: 1px solid var(--color-border);
|
|
349
|
-
border-radius: 12px;
|
|
350
|
-
padding: 24px;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
.sidebar-toc h4 {
|
|
354
|
-
font-size: 0.8rem;
|
|
355
|
-
text-transform: uppercase;
|
|
356
|
-
letter-spacing: 1px;
|
|
357
|
-
color: var(--color-light);
|
|
358
|
-
margin-bottom: 16px;
|
|
359
|
-
font-weight: 600;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
.sidebar-toc ul { list-style: none; padding: 0; margin: 0; }
|
|
363
|
-
.sidebar-toc li { margin-bottom: 0; }
|
|
364
|
-
|
|
365
|
-
.sidebar-toc a {
|
|
366
|
-
display: block;
|
|
367
|
-
padding: 10px 12px;
|
|
368
|
-
color: var(--color-medium);
|
|
369
|
-
text-decoration: none;
|
|
370
|
-
font-size: 0.9rem;
|
|
371
|
-
border-radius: 6px;
|
|
372
|
-
transition: all 0.2s;
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
.sidebar-toc a:hover {
|
|
376
|
-
color: var(--platform-color);
|
|
377
|
-
background: rgba(155, 92, 143, 0.08);
|
|
378
|
-
text-decoration: none;
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
.other-guides {
|
|
382
|
-
margin-top: 24px;
|
|
383
|
-
padding-top: 24px;
|
|
384
|
-
border-top: 1px solid var(--color-border);
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
.other-guides h4 {
|
|
388
|
-
font-size: 0.8rem;
|
|
389
|
-
text-transform: uppercase;
|
|
390
|
-
letter-spacing: 1px;
|
|
391
|
-
color: var(--color-light);
|
|
392
|
-
margin-bottom: 12px;
|
|
393
|
-
font-weight: 600;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
.other-guides a {
|
|
397
|
-
display: block;
|
|
398
|
-
padding: 8px 12px;
|
|
399
|
-
color: var(--color-medium);
|
|
400
|
-
font-size: 0.85rem;
|
|
401
|
-
border-radius: 6px;
|
|
402
|
-
transition: all 0.2s;
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
.other-guides a:hover {
|
|
406
|
-
color: var(--brand-blue);
|
|
407
|
-
background: rgba(46, 134, 171, 0.08);
|
|
408
|
-
text-decoration: none;
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
footer {
|
|
412
|
-
background: var(--color-dark);
|
|
413
|
-
color: white;
|
|
414
|
-
padding: 48px 0;
|
|
415
|
-
margin-top: 60px;
|
|
416
|
-
text-align: center;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
footer p { margin: 0; opacity: 0.9; }
|
|
420
|
-
footer a { color: var(--brand-teal); }
|
|
421
|
-
footer a:hover { color: var(--brand-green); }
|
|
422
|
-
.footer-links { margin-top: 12px; opacity: 0.7; }
|
|
423
|
-
</style>
|
|
424
|
-
</head>
|
|
425
|
-
|
|
426
|
-
<body>
|
|
427
|
-
<header>
|
|
428
|
-
<div class="header-inner">
|
|
429
|
-
<a href="/" class="logo">
|
|
430
|
-
<img src="/logo.jpeg" alt="UCP.tools logo" class="logo-icon">
|
|
431
|
-
<span class="logo-text">UCP<span class="logo-suffix">.tools</span></span>
|
|
432
|
-
</a>
|
|
433
|
-
<nav>
|
|
434
|
-
<a href="/">Validator</a>
|
|
435
|
-
<a href="/learn">Learn</a>
|
|
436
|
-
<a href="/directory">Directory</a>
|
|
437
|
-
<a href="/guides/woocommerce" class="active">WooCommerce</a>
|
|
438
|
-
</nav>
|
|
439
|
-
</div>
|
|
440
|
-
</header>
|
|
441
|
-
|
|
442
|
-
<div class="guide-hero">
|
|
443
|
-
<div class="container">
|
|
444
|
-
<h1>🛒 WooCommerce UCP Implementation</h1>
|
|
445
|
-
<p>Make your WordPress + WooCommerce store AI-ready. Enable ChatGPT, Google AI Mode, and autonomous shopping agents to transact with your products.</p>
|
|
446
|
-
<div class="guide-badges">
|
|
447
|
-
<span class="guide-badge">🤖 AI Agent Ready</span>
|
|
448
|
-
<span class="guide-badge">📦 Plugin Available</span>
|
|
449
|
-
<span class="guide-badge">🔧 Developer Friendly</span>
|
|
450
|
-
<span class="guide-badge">🔒 Secure</span>
|
|
451
|
-
</div>
|
|
452
|
-
</div>
|
|
453
|
-
</div>
|
|
454
|
-
|
|
455
|
-
<div class="guide-content">
|
|
456
|
-
<main class="guide-main">
|
|
457
|
-
<section id="overview">
|
|
458
|
-
<h2>Why Add UCP to WooCommerce?</h2>
|
|
459
|
-
<p>
|
|
460
|
-
WooCommerce powers over 5 million online stores. Adding UCP (Universal Commerce Protocol) support makes your store discoverable by AI agents, enabling automatic product discovery and purchases through ChatGPT, Google AI Mode, and other AI assistants.
|
|
461
|
-
</p>
|
|
462
|
-
<ul>
|
|
463
|
-
<li><strong>WordPress Flexibility:</strong> Full control over implementation via themes or plugins</li>
|
|
464
|
-
<li><strong>REST API Ready:</strong> WooCommerce's REST API makes UCP integration natural</li>
|
|
465
|
-
<li><strong>Schema.org Support:</strong> Many WooCommerce themes already include structured data</li>
|
|
466
|
-
<li><strong>Plugin Ecosystem:</strong> Dedicated UCP plugins available</li>
|
|
467
|
-
</ul>
|
|
468
|
-
|
|
469
|
-
<div class="tip-box platform">
|
|
470
|
-
<strong>🔌 WooUCP Plugin</strong>
|
|
471
|
-
The easiest way to add UCP support is with the <a href="https://github.com/search?q=wooucp" target="_blank">WooUCP plugin</a>, which automatically generates your UCP profile from your WooCommerce settings.
|
|
472
|
-
</div>
|
|
473
|
-
</section>
|
|
474
|
-
|
|
475
|
-
<section id="methods">
|
|
476
|
-
<h2>Implementation Methods</h2>
|
|
477
|
-
<p>Choose the method that best fits your needs:</p>
|
|
478
|
-
|
|
479
|
-
<table>
|
|
480
|
-
<tr>
|
|
481
|
-
<th>Method</th>
|
|
482
|
-
<th>Difficulty</th>
|
|
483
|
-
<th>Best For</th>
|
|
484
|
-
</tr>
|
|
485
|
-
<tr>
|
|
486
|
-
<td><strong>WooUCP Plugin</strong></td>
|
|
487
|
-
<td>Easy</td>
|
|
488
|
-
<td>Quick setup, non-developers</td>
|
|
489
|
-
</tr>
|
|
490
|
-
<tr>
|
|
491
|
-
<td><strong>Manual (functions.php)</strong></td>
|
|
492
|
-
<td>Medium</td>
|
|
493
|
-
<td>Full control, developers</td>
|
|
494
|
-
</tr>
|
|
495
|
-
<tr>
|
|
496
|
-
<td><strong>Custom Plugin</strong></td>
|
|
497
|
-
<td>Advanced</td>
|
|
498
|
-
<td>Enterprise, custom requirements</td>
|
|
499
|
-
</tr>
|
|
500
|
-
</table>
|
|
501
|
-
</section>
|
|
502
|
-
|
|
503
|
-
<section id="plugin-method">
|
|
504
|
-
<h2>Method 1: Using a Plugin (Recommended)</h2>
|
|
505
|
-
|
|
506
|
-
<div class="step-title"><span class="step-number">1</span>Install WooUCP Plugin</div>
|
|
507
|
-
<ol>
|
|
508
|
-
<li>Go to <strong>Plugins → Add New</strong> in your WordPress admin</li>
|
|
509
|
-
<li>Search for "WooUCP" or "UCP Commerce"</li>
|
|
510
|
-
<li>Click <strong>Install Now</strong>, then <strong>Activate</strong></li>
|
|
511
|
-
</ol>
|
|
512
|
-
|
|
513
|
-
<div class="tip-box">
|
|
514
|
-
<strong>💡 Alternative</strong>
|
|
515
|
-
If the plugin isn't in the repository yet, you can download it from GitHub and upload via <strong>Plugins → Add New → Upload Plugin</strong>.
|
|
516
|
-
</div>
|
|
517
|
-
|
|
518
|
-
<div class="step-title"><span class="step-number">2</span>Configure the Plugin</div>
|
|
519
|
-
<ol>
|
|
520
|
-
<li>Go to <strong>WooCommerce → Settings → UCP</strong></li>
|
|
521
|
-
<li>Enter your store details (most will be auto-filled from WooCommerce)</li>
|
|
522
|
-
<li>Review capabilities to expose (browse, search, checkout)</li>
|
|
523
|
-
<li>Click <strong>Save Changes</strong></li>
|
|
524
|
-
</ol>
|
|
525
|
-
|
|
526
|
-
<div class="step-title"><span class="step-number">3</span>Verify Installation</div>
|
|
527
|
-
<p>Visit <code>https://yourstore.com/.well-known/ucp</code> to see your generated UCP profile.</p>
|
|
528
|
-
</section>
|
|
529
|
-
|
|
530
|
-
<section id="manual-method">
|
|
531
|
-
<h2>Method 2: Manual Implementation</h2>
|
|
532
|
-
<p>For full control, implement UCP manually using WordPress functions.</p>
|
|
533
|
-
|
|
534
|
-
<div class="step-title"><span class="step-number">1</span>Generate Your UCP Profile</div>
|
|
535
|
-
<div class="cta-box">
|
|
536
|
-
<h3>Generate Your UCP Profile</h3>
|
|
537
|
-
<p>Create a customized UCP profile for your WooCommerce store.</p>
|
|
538
|
-
<a href="/#generate" class="btn">Open Generator →</a>
|
|
539
|
-
</div>
|
|
540
|
-
|
|
541
|
-
<div class="step-title"><span class="step-number">2</span>Add Rewrite Rule</div>
|
|
542
|
-
<p>Add this code to your theme's <code>functions.php</code> or a custom plugin:</p>
|
|
543
|
-
|
|
544
|
-
<pre><span style="color:#6A9955">// Add rewrite rule for /.well-known/ucp</span>
|
|
545
|
-
<span style="color:#C586C0">function</span> <span style="color:#DCDCAA">ucp_add_rewrite_rules</span>() {
|
|
546
|
-
add_rewrite_rule(
|
|
547
|
-
<span style="color:#CE9178">'^\.well-known/ucp/?$'</span>,
|
|
548
|
-
<span style="color:#CE9178">'index.php?ucp_profile=1'</span>,
|
|
549
|
-
<span style="color:#CE9178">'top'</span>
|
|
550
|
-
);
|
|
551
|
-
}
|
|
552
|
-
<span style="color:#DCDCAA">add_action</span>(<span style="color:#CE9178">'init'</span>, <span style="color:#CE9178">'ucp_add_rewrite_rules'</span>);
|
|
553
|
-
|
|
554
|
-
<span style="color:#6A9955">// Register query var</span>
|
|
555
|
-
<span style="color:#C586C0">function</span> <span style="color:#DCDCAA">ucp_query_vars</span>($vars) {
|
|
556
|
-
$vars[] = <span style="color:#CE9178">'ucp_profile'</span>;
|
|
557
|
-
<span style="color:#C586C0">return</span> $vars;
|
|
558
|
-
}
|
|
559
|
-
<span style="color:#DCDCAA">add_filter</span>(<span style="color:#CE9178">'query_vars'</span>, <span style="color:#CE9178">'ucp_query_vars'</span>);</pre>
|
|
560
|
-
|
|
561
|
-
<div class="step-title"><span class="step-number">3</span>Create the Response Handler</div>
|
|
562
|
-
<pre><span style="color:#6A9955">// Handle UCP profile request</span>
|
|
563
|
-
<span style="color:#C586C0">function</span> <span style="color:#DCDCAA">ucp_template_redirect</span>() {
|
|
564
|
-
<span style="color:#C586C0">if</span> (get_query_var(<span style="color:#CE9178">'ucp_profile'</span>)) {
|
|
565
|
-
header(<span style="color:#CE9178">'Content-Type: application/json'</span>);
|
|
566
|
-
header(<span style="color:#CE9178">'Access-Control-Allow-Origin: *'</span>);
|
|
567
|
-
|
|
568
|
-
$profile = [
|
|
569
|
-
<span style="color:#CE9178">'profile_version'</span> => <span style="color:#CE9178">'1.0'</span>,
|
|
570
|
-
<span style="color:#CE9178">'merchant'</span> => [
|
|
571
|
-
<span style="color:#CE9178">'name'</span> => get_bloginfo(<span style="color:#CE9178">'name'</span>),
|
|
572
|
-
<span style="color:#CE9178">'url'</span> => home_url(),
|
|
573
|
-
<span style="color:#CE9178">'description'</span> => get_bloginfo(<span style="color:#CE9178">'description'</span>),
|
|
574
|
-
<span style="color:#CE9178">'contact'</span> => [
|
|
575
|
-
<span style="color:#CE9178">'email'</span> => get_option(<span style="color:#CE9178">'woocommerce_email_from_address'</span>)
|
|
576
|
-
]
|
|
577
|
-
],
|
|
578
|
-
<span style="color:#CE9178">'capabilities'</span> => [<span style="color:#CE9178">'browse'</span>, <span style="color:#CE9178">'search'</span>],
|
|
579
|
-
<span style="color:#CE9178">'policies'</span> => [
|
|
580
|
-
<span style="color:#CE9178">'returns_url'</span> => get_privacy_policy_url(), <span style="color:#6A9955">// Update as needed</span>
|
|
581
|
-
<span style="color:#CE9178">'shipping_url'</span> => home_url(<span style="color:#CE9178">'/shipping-policy/'</span>),
|
|
582
|
-
<span style="color:#CE9178">'privacy_url'</span> => get_privacy_policy_url()
|
|
583
|
-
],
|
|
584
|
-
<span style="color:#CE9178">'service_bindings'</span> => [
|
|
585
|
-
[
|
|
586
|
-
<span style="color:#CE9178">'type'</span> => <span style="color:#CE9178">'REST'</span>,
|
|
587
|
-
<span style="color:#CE9178">'base_url'</span> => home_url(<span style="color:#CE9178">'/wp-json/wc/v3'</span>)
|
|
588
|
-
]
|
|
589
|
-
]
|
|
590
|
-
];
|
|
591
|
-
|
|
592
|
-
echo json_encode($profile, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
|
|
593
|
-
exit;
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
<span style="color:#DCDCAA">add_action</span>(<span style="color:#CE9178">'template_redirect'</span>, <span style="color:#CE9178">'ucp_template_redirect'</span>);</pre>
|
|
597
|
-
|
|
598
|
-
<div class="step-title"><span class="step-number">4</span>Flush Rewrite Rules</div>
|
|
599
|
-
<p>After adding the code, flush rewrite rules:</p>
|
|
600
|
-
<ol>
|
|
601
|
-
<li>Go to <strong>Settings → Permalinks</strong></li>
|
|
602
|
-
<li>Click <strong>Save Changes</strong> (no changes needed, just save)</li>
|
|
603
|
-
</ol>
|
|
604
|
-
|
|
605
|
-
<div class="tip-box warning">
|
|
606
|
-
<strong>⚠️ Important</strong>
|
|
607
|
-
Always flush rewrite rules after adding new rewrite rules. Failing to do so will result in 404 errors.
|
|
608
|
-
</div>
|
|
609
|
-
</section>
|
|
610
|
-
|
|
611
|
-
<section id="schema-markup">
|
|
612
|
-
<h2>Schema.org Markup</h2>
|
|
613
|
-
<p>
|
|
614
|
-
For maximum AI compatibility, ensure your products have proper Schema.org markup. Many WooCommerce themes include this by default.
|
|
615
|
-
</p>
|
|
616
|
-
|
|
617
|
-
<h3>Recommended Plugins</h3>
|
|
618
|
-
<ul>
|
|
619
|
-
<li><strong>Yoast SEO:</strong> Includes WooCommerce schema support</li>
|
|
620
|
-
<li><strong>Rank Math:</strong> Advanced schema options for products</li>
|
|
621
|
-
<li><strong>Schema Pro:</strong> Dedicated schema plugin</li>
|
|
622
|
-
</ul>
|
|
623
|
-
|
|
624
|
-
<p>Verify your schema with:</p>
|
|
625
|
-
<ul>
|
|
626
|
-
<li><a href="https://search.google.com/test/rich-results" target="_blank">Google Rich Results Test</a></li>
|
|
627
|
-
<li><a href="https://validator.schema.org/" target="_blank">Schema.org Validator</a></li>
|
|
628
|
-
</ul>
|
|
629
|
-
</section>
|
|
630
|
-
|
|
631
|
-
<section id="validation">
|
|
632
|
-
<h2>Validate Your Implementation</h2>
|
|
633
|
-
|
|
634
|
-
<div class="cta-box">
|
|
635
|
-
<h3>Validate Your WooCommerce Store</h3>
|
|
636
|
-
<p>Check your UCP implementation and AI commerce readiness.</p>
|
|
637
|
-
<a href="/" class="btn">Run Validation →</a>
|
|
638
|
-
</div>
|
|
639
|
-
</section>
|
|
640
|
-
|
|
641
|
-
<section id="common-issues">
|
|
642
|
-
<h2>Common Issues & Solutions</h2>
|
|
643
|
-
|
|
644
|
-
<table>
|
|
645
|
-
<tr>
|
|
646
|
-
<th>Issue</th>
|
|
647
|
-
<th>Solution</th>
|
|
648
|
-
</tr>
|
|
649
|
-
<tr>
|
|
650
|
-
<td>404 on <code>/.well-known/ucp</code></td>
|
|
651
|
-
<td>Flush permalinks: Settings → Permalinks → Save</td>
|
|
652
|
-
</tr>
|
|
653
|
-
<tr>
|
|
654
|
-
<td>CORS errors</td>
|
|
655
|
-
<td>Add <code>Access-Control-Allow-Origin: *</code> header</td>
|
|
656
|
-
</tr>
|
|
657
|
-
<tr>
|
|
658
|
-
<td>Wrong content type</td>
|
|
659
|
-
<td>Ensure <code>Content-Type: application/json</code> header</td>
|
|
660
|
-
</tr>
|
|
661
|
-
<tr>
|
|
662
|
-
<td>Caching issues</td>
|
|
663
|
-
<td>Exclude <code>/.well-known/ucp</code> from caching plugins</td>
|
|
664
|
-
</tr>
|
|
665
|
-
</table>
|
|
666
|
-
|
|
667
|
-
<div class="tip-box">
|
|
668
|
-
<strong>💡 Caching Tip</strong>
|
|
669
|
-
If using WP Super Cache, W3 Total Cache, or similar, add <code>/.well-known/ucp</code> to the exclusion list.
|
|
670
|
-
</div>
|
|
671
|
-
</section>
|
|
672
|
-
|
|
673
|
-
<section id="testing">
|
|
674
|
-
<h2>🤖 Test with AI Agents</h2>
|
|
675
|
-
|
|
676
|
-
<div class="cta-box">
|
|
677
|
-
<h3>Run AI Agent Simulation</h3>
|
|
678
|
-
<p>Test how AI shopping agents will interact with your WooCommerce store.</p>
|
|
679
|
-
<a href="/#simulate" class="btn">Open Simulator →</a>
|
|
680
|
-
</div>
|
|
681
|
-
</section>
|
|
682
|
-
|
|
683
|
-
<section id="resources">
|
|
684
|
-
<h2>Resources</h2>
|
|
685
|
-
<ul>
|
|
686
|
-
<li><a href="https://ucp.dev" target="_blank">Official UCP Specification</a></li>
|
|
687
|
-
<li><a href="https://woocommerce.github.io/woocommerce-rest-api-docs/" target="_blank">WooCommerce REST API Docs</a></li>
|
|
688
|
-
<li><a href="https://developer.wordpress.org/apis/routes/rewrite/" target="_blank">WordPress Rewrite API</a></li>
|
|
689
|
-
<li><a href="/learn">UCP Learning Center</a></li>
|
|
690
|
-
</ul>
|
|
691
|
-
</section>
|
|
692
|
-
</main>
|
|
693
|
-
|
|
694
|
-
<aside class="guide-sidebar">
|
|
695
|
-
<div class="sidebar-toc">
|
|
696
|
-
<h4>On This Page</h4>
|
|
697
|
-
<ul>
|
|
698
|
-
<li><a href="#overview">Why Add UCP?</a></li>
|
|
699
|
-
<li><a href="#methods">Implementation Methods</a></li>
|
|
700
|
-
<li><a href="#plugin-method">Plugin Method</a></li>
|
|
701
|
-
<li><a href="#manual-method">Manual Method</a></li>
|
|
702
|
-
<li><a href="#schema-markup">Schema.org Markup</a></li>
|
|
703
|
-
<li><a href="#validation">Validation</a></li>
|
|
704
|
-
<li><a href="#common-issues">Common Issues</a></li>
|
|
705
|
-
<li><a href="#testing">Test with AI</a></li>
|
|
706
|
-
<li><a href="#resources">Resources</a></li>
|
|
707
|
-
</ul>
|
|
708
|
-
</div>
|
|
709
|
-
|
|
710
|
-
<div class="other-guides">
|
|
711
|
-
<h4>Other Platforms</h4>
|
|
712
|
-
<a href="/guides/shopify">Shopify</a>
|
|
713
|
-
<a href="/guides/magento">Magento</a>
|
|
714
|
-
<a href="/guides/wix">Wix</a>
|
|
715
|
-
<a href="/guides/bigcommerce">BigCommerce</a>
|
|
716
|
-
<a href="/guides/squarespace">Squarespace</a>
|
|
717
|
-
</div>
|
|
718
|
-
</aside>
|
|
719
|
-
</div>
|
|
720
|
-
|
|
721
|
-
<footer>
|
|
722
|
-
<div class="container">
|
|
723
|
-
<p>UCP Tools — Built for the AI Commerce era</p>
|
|
724
|
-
<p class="footer-links">
|
|
725
|
-
<a href="https://github.com/Nolpak14/ucp-tools" target="_blank">GitHub</a> ·
|
|
726
|
-
<a href="https://ucp.dev" target="_blank">UCP Spec</a> ·
|
|
727
|
-
<a href="/">Validator</a>
|
|
728
|
-
</p>
|
|
729
|
-
</div>
|
|
730
|
-
</footer>
|
|
731
|
-
</body>
|
|
732
|
-
|
|
733
|
-
</html>
|