claude-plugin-wordpress-manager 1.7.1 → 1.8.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/.claude-plugin/plugin.json +5 -3
- package/CHANGELOG.md +33 -0
- package/agents/wp-ecommerce-manager.md +136 -0
- package/agents/wp-site-manager.md +1 -0
- package/docs/GUIDE.md +306 -33
- package/docs/plans/2026-02-28-roadmap-v1.8-v2.1-design.md +314 -0
- package/docs/plans/2026-02-28-woocommerce-v1.8.0.md +2012 -0
- package/package.json +6 -3
- package/servers/wp-rest-bridge/build/tools/index.d.ts +927 -0
- package/servers/wp-rest-bridge/build/tools/index.js +20 -2
- package/servers/wp-rest-bridge/build/tools/wc-coupons.d.ts +144 -0
- package/servers/wp-rest-bridge/build/tools/wc-coupons.js +92 -0
- package/servers/wp-rest-bridge/build/tools/wc-customers.d.ts +141 -0
- package/servers/wp-rest-bridge/build/tools/wc-customers.js +92 -0
- package/servers/wp-rest-bridge/build/tools/wc-orders.d.ts +186 -0
- package/servers/wp-rest-bridge/build/tools/wc-orders.js +128 -0
- package/servers/wp-rest-bridge/build/tools/wc-products.d.ts +324 -0
- package/servers/wp-rest-bridge/build/tools/wc-products.js +177 -0
- package/servers/wp-rest-bridge/build/tools/wc-reports.d.ts +117 -0
- package/servers/wp-rest-bridge/build/tools/wc-reports.js +94 -0
- package/servers/wp-rest-bridge/build/tools/wc-settings.d.ts +72 -0
- package/servers/wp-rest-bridge/build/tools/wc-settings.js +70 -0
- package/servers/wp-rest-bridge/build/types.d.ts +85 -0
- package/servers/wp-rest-bridge/build/wordpress.d.ts +9 -0
- package/servers/wp-rest-bridge/build/wordpress.js +75 -0
- package/skills/wordpress-router/references/decision-tree.md +3 -1
- package/skills/wp-audit/SKILL.md +1 -0
- package/skills/wp-backup/SKILL.md +1 -0
- package/skills/wp-deploy/SKILL.md +1 -0
- package/skills/wp-woocommerce/SKILL.md +110 -0
- package/skills/wp-woocommerce/references/analytics-reports.md +75 -0
- package/skills/wp-woocommerce/references/coupon-marketing.md +92 -0
- package/skills/wp-woocommerce/references/order-workflow.md +88 -0
- package/skills/wp-woocommerce/references/payment-gateways.md +69 -0
- package/skills/wp-woocommerce/references/product-management.md +61 -0
- package/skills/wp-woocommerce/references/shipping-setup.md +79 -0
- package/skills/wp-woocommerce/references/tax-configuration.md +91 -0
- package/skills/wp-woocommerce/references/wc-extensions.md +97 -0
- package/skills/wp-woocommerce/scripts/woocommerce_inspect.mjs +181 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# WooCommerce Extensions
|
|
2
|
+
|
|
3
|
+
WooCommerce's functionality is extended through official and third-party plugins available on the WooCommerce Marketplace and WordPress.org. Understanding the extension ecosystem helps identify the right tools for store requirements and avoid compatibility issues.
|
|
4
|
+
|
|
5
|
+
## MCP Tools
|
|
6
|
+
|
|
7
|
+
| Tool | Usage |
|
|
8
|
+
|------|-------|
|
|
9
|
+
| `wc_get_system_status` | Lists active plugins, WC version, PHP version, database info |
|
|
10
|
+
|
|
11
|
+
Use `wc_get_system_status` to inspect which extensions are currently active and verify version compatibility.
|
|
12
|
+
|
|
13
|
+
## Extension Categories
|
|
14
|
+
|
|
15
|
+
### Payments
|
|
16
|
+
|
|
17
|
+
| Extension | Use Case |
|
|
18
|
+
|-----------|----------|
|
|
19
|
+
| WooCommerce Stripe | Credit cards, Apple Pay, Google Pay |
|
|
20
|
+
| WooCommerce PayPal Payments | Modern PayPal integration with card fields |
|
|
21
|
+
| Mollie for WooCommerce | European payment methods (iDEAL, Klarna, SEPA) |
|
|
22
|
+
| WooCommerce Square | In-person + online, inventory sync |
|
|
23
|
+
|
|
24
|
+
### Subscriptions and Recurring
|
|
25
|
+
|
|
26
|
+
| Extension | Use Case |
|
|
27
|
+
|-----------|----------|
|
|
28
|
+
| WooCommerce Subscriptions | Recurring billing, trial periods, subscription management |
|
|
29
|
+
| WooCommerce Memberships | Content/product access control by membership level |
|
|
30
|
+
| YITH WooCommerce Subscriptions | Alternative subscriptions with more flexibility |
|
|
31
|
+
|
|
32
|
+
### Shipping
|
|
33
|
+
|
|
34
|
+
| Extension | Use Case |
|
|
35
|
+
|-----------|----------|
|
|
36
|
+
| WooCommerce Table Rate Shipping | Complex rules by weight, quantity, destination |
|
|
37
|
+
| WooCommerce ShipStation | Order fulfillment and label printing |
|
|
38
|
+
| WooCommerce FedEx / UPS | Real-time carrier rates |
|
|
39
|
+
|
|
40
|
+
### Marketing and Analytics
|
|
41
|
+
|
|
42
|
+
| Extension | Use Case |
|
|
43
|
+
|-----------|----------|
|
|
44
|
+
| WooCommerce Mailchimp | Abandoned cart emails, list segmentation |
|
|
45
|
+
| Google Analytics for WooCommerce | Enhanced e-commerce tracking |
|
|
46
|
+
| WooCommerce Klarna On-Site Messaging | BNPL promotional messaging |
|
|
47
|
+
|
|
48
|
+
### Bookings and Services
|
|
49
|
+
|
|
50
|
+
| Extension | Use Case |
|
|
51
|
+
|-----------|----------|
|
|
52
|
+
| WooCommerce Bookings | Appointment and reservation scheduling |
|
|
53
|
+
| WooCommerce Accommodation Bookings | Hotel/rental with nightly rates |
|
|
54
|
+
|
|
55
|
+
### Product Enhancements
|
|
56
|
+
|
|
57
|
+
| Extension | Use Case |
|
|
58
|
+
|-----------|----------|
|
|
59
|
+
| WooCommerce Product Add-Ons | Custom options per product (engraving, giftwrap) |
|
|
60
|
+
| YITH WooCommerce Wishlist | Customer wishlists |
|
|
61
|
+
| WooCommerce Composite Products | Build-your-own product bundles |
|
|
62
|
+
|
|
63
|
+
## WooCommerce Marketplace vs WordPress.org
|
|
64
|
+
|
|
65
|
+
| Source | Characteristics |
|
|
66
|
+
|--------|-----------------|
|
|
67
|
+
| WooCommerce Marketplace (woo.com) | Official vetting, WC compatibility guaranteed, paid extensions |
|
|
68
|
+
| WordPress.org | Free, community-reviewed, variable quality and support |
|
|
69
|
+
| Third-party shops (e.g., YITH, Barn2) | Specialized developers, often high quality, separate licensing |
|
|
70
|
+
|
|
71
|
+
## Compatibility Check Procedure
|
|
72
|
+
|
|
73
|
+
1. `wc_get_system_status` — note WooCommerce version and PHP version
|
|
74
|
+
2. Check extension's changelog/readme for supported WC version range
|
|
75
|
+
3. Verify PHP version meets extension minimum requirement
|
|
76
|
+
4. Check WooCommerce Marketplace compatibility tab for known conflicts
|
|
77
|
+
5. Test in staging environment before installing on production
|
|
78
|
+
|
|
79
|
+
## System Status Fields (via `wc_get_system_status`)
|
|
80
|
+
|
|
81
|
+
| Field | What to Check |
|
|
82
|
+
|-------|---------------|
|
|
83
|
+
| `woocommerce_version` | Current WC version |
|
|
84
|
+
| `wp_version` | Current WordPress version |
|
|
85
|
+
| `php_version` | PHP version (extensions require 7.4+ minimum typically) |
|
|
86
|
+
| `active_plugins` | List of active plugins with versions |
|
|
87
|
+
| `database.wc_database_version` | WC DB schema version (should match WC version) |
|
|
88
|
+
| `environment.https` | Whether SSL is enabled |
|
|
89
|
+
|
|
90
|
+
## Tips and Gotchas
|
|
91
|
+
|
|
92
|
+
- **Only one subscriptions plugin**: WooCommerce Subscriptions and YITH Subscriptions conflict — install only one.
|
|
93
|
+
- **Page builder conflicts**: Some product add-on extensions conflict with Elementor or Divi page builders — check compatibility before installing.
|
|
94
|
+
- **WC.com license activation**: Official WooCommerce Marketplace extensions require an active subscription and license key for updates and support.
|
|
95
|
+
- **Extension updates**: Always test extension updates in staging first. Major WC version upgrades (e.g., 8.x → 9.x) can break extensions that haven't been updated.
|
|
96
|
+
- **Deactivate vs uninstall**: Deactivating an extension preserves its data. Uninstalling (deleting) may remove database tables — check the extension's uninstall behavior first.
|
|
97
|
+
- **Performance impact**: Each active extension adds overhead. `wc_get_system_status` active_plugins count is a useful indicator — stores with 50+ active plugins should consider performance auditing.
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* woocommerce_inspect.mjs — Detect WooCommerce presence and configuration.
|
|
3
|
+
*
|
|
4
|
+
* Scans project files for WooCommerce indicators (plugin files, hooks, composer deps)
|
|
5
|
+
* and checks WP_SITES_CONFIG for WC credentials.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* node woocommerce_inspect.mjs [--cwd=/path/to/check]
|
|
9
|
+
*
|
|
10
|
+
* Exit codes:
|
|
11
|
+
* 0 — WooCommerce indicators found
|
|
12
|
+
* 1 — no WooCommerce indicators found
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { readFileSync, existsSync, readdirSync, statSync } from 'node:fs';
|
|
16
|
+
import { join, resolve } from 'node:path';
|
|
17
|
+
import { argv, env, stdout, exit } from 'node:process';
|
|
18
|
+
|
|
19
|
+
// ---------------------------------------------------------------------------
|
|
20
|
+
// Helpers
|
|
21
|
+
// ---------------------------------------------------------------------------
|
|
22
|
+
|
|
23
|
+
function readFileSafe(filePath) {
|
|
24
|
+
try { return readFileSync(filePath, 'utf-8'); } catch { return null; }
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function readJsonSafe(filePath) {
|
|
28
|
+
const raw = readFileSafe(filePath);
|
|
29
|
+
if (!raw) return null;
|
|
30
|
+
try { return JSON.parse(raw); } catch { return null; }
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function existsSafe(filePath) {
|
|
34
|
+
try { return existsSync(filePath); } catch { return false; }
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function findFiles(dir, pattern, maxDepth = 3, depth = 0) {
|
|
38
|
+
const results = [];
|
|
39
|
+
if (depth > maxDepth) return results;
|
|
40
|
+
try {
|
|
41
|
+
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
42
|
+
const full = join(dir, entry.name);
|
|
43
|
+
if (entry.isDirectory() && !entry.name.startsWith('.') && entry.name !== 'node_modules' && entry.name !== 'vendor') {
|
|
44
|
+
results.push(...findFiles(full, pattern, maxDepth, depth + 1));
|
|
45
|
+
} else if (entry.isFile() && pattern.test(entry.name)) {
|
|
46
|
+
results.push(full);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
} catch { /* permission denied, etc. */ }
|
|
50
|
+
return results;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// ---------------------------------------------------------------------------
|
|
54
|
+
// Detectors
|
|
55
|
+
// ---------------------------------------------------------------------------
|
|
56
|
+
|
|
57
|
+
function detectWcPlugin(cwd) {
|
|
58
|
+
// Check for WooCommerce plugin directory
|
|
59
|
+
const wcPaths = [
|
|
60
|
+
join(cwd, 'wp-content/plugins/woocommerce/woocommerce.php'),
|
|
61
|
+
join(cwd, 'plugins/woocommerce/woocommerce.php'),
|
|
62
|
+
join(cwd, 'woocommerce.php'),
|
|
63
|
+
];
|
|
64
|
+
for (const p of wcPaths) {
|
|
65
|
+
if (existsSafe(p)) {
|
|
66
|
+
const content = readFileSafe(p);
|
|
67
|
+
const versionMatch = content?.match(/\*\s*Version:\s*(.+)/i);
|
|
68
|
+
return { found: true, path: p, version: versionMatch?.[1]?.trim() || 'unknown' };
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function detectComposerDeps(cwd) {
|
|
75
|
+
const composer = readJsonSafe(join(cwd, 'composer.json'));
|
|
76
|
+
if (!composer) return null;
|
|
77
|
+
const allDeps = { ...composer.require, ...composer['require-dev'] };
|
|
78
|
+
const wcDeps = Object.keys(allDeps).filter(k => k.includes('woocommerce'));
|
|
79
|
+
return wcDeps.length > 0 ? { deps: wcDeps } : null;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function detectWcHooks(cwd) {
|
|
83
|
+
const phpFiles = findFiles(cwd, /\.php$/, 3);
|
|
84
|
+
const hooks = { actions: new Set(), filters: new Set() };
|
|
85
|
+
for (const f of phpFiles.slice(0, 100)) {
|
|
86
|
+
const content = readFileSafe(f);
|
|
87
|
+
if (!content) continue;
|
|
88
|
+
const actionMatches = content.matchAll(/add_action\(\s*['"]([^'"]*woocommerce[^'"]*)['"]/gi);
|
|
89
|
+
for (const m of actionMatches) hooks.actions.add(m[1]);
|
|
90
|
+
const filterMatches = content.matchAll(/add_filter\(\s*['"]([^'"]*woocommerce[^'"]*)['"]/gi);
|
|
91
|
+
for (const m of filterMatches) hooks.filters.add(m[1]);
|
|
92
|
+
const wcFuncMatches = content.matchAll(/\b(wc_get_[a-z_]+|WC\(\))/g);
|
|
93
|
+
for (const m of wcFuncMatches) hooks.actions.add(m[1]);
|
|
94
|
+
}
|
|
95
|
+
return (hooks.actions.size + hooks.filters.size) > 0
|
|
96
|
+
? { actions: [...hooks.actions].slice(0, 20), filters: [...hooks.filters].slice(0, 20) }
|
|
97
|
+
: null;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function detectTemplateOverrides(cwd) {
|
|
101
|
+
const themePaths = [
|
|
102
|
+
join(cwd, 'woocommerce'),
|
|
103
|
+
join(cwd, 'templates/woocommerce'),
|
|
104
|
+
join(cwd, 'theme/woocommerce'),
|
|
105
|
+
];
|
|
106
|
+
for (const p of themePaths) {
|
|
107
|
+
if (existsSafe(p)) {
|
|
108
|
+
try {
|
|
109
|
+
const files = findFiles(p, /\.php$/, 2);
|
|
110
|
+
return { path: p, templateCount: files.length };
|
|
111
|
+
} catch { /* skip */ }
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
return null;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function detectWcConfig() {
|
|
118
|
+
const sitesJson = env.WP_SITES_CONFIG;
|
|
119
|
+
if (!sitesJson) return null;
|
|
120
|
+
try {
|
|
121
|
+
const sites = JSON.parse(sitesJson);
|
|
122
|
+
const wcSites = sites.filter(s => s.wc_consumer_key && s.wc_consumer_secret);
|
|
123
|
+
return wcSites.length > 0
|
|
124
|
+
? { configured_sites: wcSites.map(s => s.id), count: wcSites.length }
|
|
125
|
+
: null;
|
|
126
|
+
} catch { return null; }
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// ---------------------------------------------------------------------------
|
|
130
|
+
// Main
|
|
131
|
+
// ---------------------------------------------------------------------------
|
|
132
|
+
|
|
133
|
+
function main() {
|
|
134
|
+
const cwdArg = argv.find(a => a.startsWith('--cwd='));
|
|
135
|
+
const cwd = cwdArg ? resolve(cwdArg.split('=')[1]) : process.cwd();
|
|
136
|
+
|
|
137
|
+
const plugin = detectWcPlugin(cwd);
|
|
138
|
+
const composer = detectComposerDeps(cwd);
|
|
139
|
+
const hooks = detectWcHooks(cwd);
|
|
140
|
+
const templates = detectTemplateOverrides(cwd);
|
|
141
|
+
const config = detectWcConfig();
|
|
142
|
+
|
|
143
|
+
const signals = [];
|
|
144
|
+
if (plugin) signals.push('woocommerce_plugin');
|
|
145
|
+
if (composer) signals.push('composer_dependency');
|
|
146
|
+
if (hooks) signals.push('wc_hooks_usage');
|
|
147
|
+
if (templates) signals.push('template_overrides');
|
|
148
|
+
if (config) signals.push('wc_api_configured');
|
|
149
|
+
|
|
150
|
+
const report = {
|
|
151
|
+
tool: 'woocommerce_inspect',
|
|
152
|
+
version: '1.0.0',
|
|
153
|
+
timestamp: new Date().toISOString(),
|
|
154
|
+
cwd,
|
|
155
|
+
found: signals.length > 0,
|
|
156
|
+
signals,
|
|
157
|
+
details: {
|
|
158
|
+
plugin: plugin || undefined,
|
|
159
|
+
composer: composer || undefined,
|
|
160
|
+
hooks: hooks || undefined,
|
|
161
|
+
templates: templates || undefined,
|
|
162
|
+
api_config: config || undefined,
|
|
163
|
+
},
|
|
164
|
+
recommendations: [],
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
if (!config && signals.length > 0) {
|
|
168
|
+
report.recommendations.push('Add wc_consumer_key and wc_consumer_secret to WP_SITES_CONFIG for API access');
|
|
169
|
+
}
|
|
170
|
+
if (plugin) {
|
|
171
|
+
report.recommendations.push(`WooCommerce ${plugin.version} detected — all 30 WC tools available`);
|
|
172
|
+
}
|
|
173
|
+
if (hooks && !plugin) {
|
|
174
|
+
report.recommendations.push('WooCommerce hooks detected but plugin not found locally — this may be a WC extension');
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
stdout.write(JSON.stringify(report, null, 2) + '\n');
|
|
178
|
+
exit(signals.length > 0 ? 0 : 1);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
main();
|