Generated banner for Rp Source Wordpress
Generated logo for Rp Source Wordpress

Rp Source Wordpress

WixOfficialPublished by Wix

  • Skill
  • Tool integration
  • Automation and integrations
  • MIT
  • Medium risk
  • Has scripts

From the author

WordPress and WooCommerce source adapter: REST capture, auth, pagination, and read contract for codegen. Use when the source platform is WordPress or WooCommerce.
— the description by Wix

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides the necessary logic to interface with WordPress and WooCommerce REST APIs. It handles authentication, pagination, and schema discovery, ensuring that platform-specific quirks are managed consistently. It acts as a reference for discovery and code generation stages, allowing the broader migration workflow to remain platform-agnostic. The skill includes mechanisms for plugin detection, handling non-standard response envelopes, and managing authenticated versus public data access.

What it does

  • Samples WordPress and WooCommerce REST APIs to discover site structure and data schemas.
  • Manages authentication using WordPress Application Passwords and WooCommerce consumer keys.
  • Detects and profiles installed plugins to determine migration feasibility.
  • Provides a standardized transport layer for generated readers to extract data reliably.
  • Handles complex data scenarios like parent-child resource relationships and non-standard API response envelopes.
  • Identifies and flags data that requires manual user intervention, such as plugin-specific database tables.

When to use it

  • When the source platform for a migration is identified as WordPress or WooCommerce.
  • During the discovery phase to sample source data and generate a source profile.
  • During the code generation phase to create reliable data extractors.
  • When needing to determine if installed plugins can be migrated natively or require custom development.

Advantages

  • Centralizes platform-specific logic, preventing hardcoded dependencies in the main migration workflow.
  • Ensures consistent handling of authentication and rate-limiting across different migration projects.
  • Provides a deterministic approach to plugin coverage, reducing guesswork.
  • Supports robust data extraction by reusing a shared, tested transport module.

Usage examples

“Run the discovery process for a WordPress site.”
The agent executes the discovery script, samples the REST index, and generates a source profile including entity schemas and plugin inventory.
“How do I handle WooCommerce plugins that do not have a REST API?”
The agent identifies the plugin, flags it as requiring manual intervention or a database export, and records the status in the plugin inventory.

Install

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/wix/rp-source-wordpress-c7wf/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip rp-source-wordpress.zip -d .agents/skills

Documentation by Wix

rp-source-wordpress

WordPress / WooCommerce source adapter. Owns every WordPress-specific detail the platform-agnostic skills must not hardcode: how to capture the schema, how to read the data, auth models, pagination, and REST quirks.

When this skill is used

This is not a stage in the migration flow — it is a reference consulted by two stages:

  • rp-discovery consults the Capture section to sample the source and produce the canonical source-profile.md + source-schema.json.

  • rp-import-codegen consults the Read contract section to generate a reader that bulk-extracts WordPress data correctly (auth, pagination, wc/v3 vs wp/v2) into durable project-local files for the later import step.

rp-execute-import never consults this skill — by the time execution runs, the WordPress-specific knowledge is already baked into the generated reader code. Keeping the WordPress knowledge here is what lets the rest of the workflow stay platform-agnostic.

Platform identity

  • Source platform: WordPress (core REST wp/v2), optionally WooCommerce (wc/v3).

  • Detect by hitting <base-url>/wp-json/ — the REST index lists advertised namespaces.

  • Set "platform": "wordpress" (and note WooCommerce presence in sourceMeta) in the emitted source-schema.json.

Capture (discovery-time)

Sampling the source to learn its shape — not a bulk export.

The Wix domain knowledge base may be used as a classifier supplement during synthesis, but not as a sampling mandate. When a discovered WordPress/WooCommerce route matches a known alias, annotate the emitted entity with sourceMeta.candidateTargetRefs[]; do not turn that hint into a target decision here. Keep frontend, theme, runtime, admin, and transient routes skipped by default even if a knowledge entry exists for a related setup/config target.

Before capture, verify migrations/<project>/config/source.wordpress.env. Create it if missing with empty values:

WP_BASE_URL=
WP_USERNAME=
WP_APPLICATION_PASSWORD=
WP_MEDIA_URL_REWRITE_FROM=
WP_MEDIA_URL_REWRITE_TO=
WC_CONSUMER_KEY=
WC_CONSUMER_SECRET=

Before requesting any WordPress / WooCommerce credentials for a URL-based migration, ask the user which data scope they want:

  • public content only

  • also include private/authenticated data

This choice is mandatory and must be explicit. Do not ask for WP_USERNAME, WP_APPLICATION_PASSWORD, or WooCommerce keys until the user chooses also include private/authenticated data. After that choice, collect sensitive values through the secure Secrets Manager flow; do not ask the user to paste them into chat.

Key sensitivity is predefined and does not change at runtime. Requiredness is separate and may depend on the selected acquisition mode or source behavior.

KeySensitivityRequiredness
WP_BASE_URLnon-sensitiveRequired for URL-based capture
WP_USERNAMEsensitiveRequired for private/authenticated WordPress capture
WP_APPLICATION_PASSWORDsensitiveRequired for private/authenticated WordPress capture
WP_MEDIA_URL_REWRITE_FROMnon-sensitiveOptional
WP_MEDIA_URL_REWRITE_TOnon-sensitiveOptional
WC_CONSUMER_KEYsensitiveOptional unless WooCommerce rejects the WordPress Application Password for wc/v3 reads
WC_CONSUMER_SECRETsensitiveOptional unless WooCommerce rejects the WordPress Application Password for wc/v3 reads

Required for a complete WordPress/WooCommerce capture:

  • WP_BASE_URL

  • WP_USERNAME

  • WP_APPLICATION_PASSWORD

WC_CONSUMER_KEY and WC_CONSUMER_SECRET are optional when WooCommerce accepts the WordPress Application Password for wc/v3 reads; ask for them only if WooCommerce routes return 401/403 with the WordPress Application Password.

WP_MEDIA_URL_REWRITE_FROM and WP_MEDIA_URL_REWRITE_TO are optional. Use them when the WordPress API is reached through a public tunnel but media/file URLs inside records still point at localhost or another private origin. If they are blank, generated readers may rewrite localhost/private origins to WP_BASE_URL when WP_BASE_URL is public.

config/source.wordpress.env is a secret-bearing file once it may contain real values. Do not read it with whole-file commands that print its contents into tool output. Check only whether the file exists and whether each required key is present/blank/missing; when describing status, name keys only and never echo values.

  1. Run the deterministic capture script from this skill's directory (the folder containing this SKILL.md; see CONVENTIONS.md):

    node scripts/wp-discovery.js --env-file <migrations-root>/<project>/config/source.wordpress.env --out-dir <migrations-root>/<project>/data/wp-discovery

    It walks the REST index, runs one OPTIONS + a small GET sample per entity, and writes per-entity markdown (routes, schemas, sample records, record counts, relationships). --env-file is the preferred launch path for project-local credential-bearing config because it avoids shell sourcing of secret-bearing files. Pass direct auth options only when there is no project-local config yet. For long runs, pass --progress-log <path> and poll it per CONVENTIONS.md#progress-log-polling.

  2. If the user chose public content only, run unauthenticated and keep the scope framed as public-only. Do not pivot into asking for credentials unless the user changes scope.

  3. Credentials are required for a complete capture. Without auth, only published public content is reachable; drafts, WooCommerce (wc/v3), user PII, and private fields return 401/403, making their recordCount/inUse unreliable. The script flags this in its README under "Incomplete Capture (Authentication)" — do not treat an unauthenticated run as authoritative.

    Author identity is a specific casualty of public-only capture. Public /wp/v2/users lists only users who authored public posts and exposes no roles and no emails — admin vs editor vs contributor vs subscriber is indistinguishable. Roles/capabilities require context=edit (App Password with list_users) or a DB dump (wp_usermeta → wp_capabilities); WXR exports carry author login/email/display name but no roles either. Vanilla WP has no guest-byline concept (every byline is a user); plugin guest authors (Co-Authors Plus guest-author entities) are separate non-user records. Record author capture mode in the source profile — it determines the blog authorAttributionMode downstream (public-only → fallback/owner attribution; authenticated → per-author mapping: administrators → owner user-member, content roles → per-author members; subscribers/customers → Wix contacts by default — a contact is the no-login CRM person entity and Contacts V5 upserts in bulk — promote to full site members (MEM-01: 1/sec serial, re-registration) only when member-gated features are in scope. Every Wix member auto-creates its contact, so member-first ordering: never pre-create a contact for someone who will become a member. Note contacts cannot author blog posts or comments — bylines need members).

  4. Distinguish supported entities (advertised by the REST index) from used entities (those with recordCount > 0). Entities advertised but empty should be flagged, not mapped as if they hold data.

  5. Backend data scope. The capture script classifies REST routes before per-route OPTIONS or sample GET requests. By default it samples backend data routes and skips frontend, theme/editor, runtime session, admin dashboard, diagnostics, marketplace setup, and integration/helper APIs. It writes the skipped-route audit trail to skipped-routes.json.

    For WooCommerce, prefer canonical durable data APIs such as wc/v3 over duplicated wc/v2/wc/v1 routes for authenticated/private commerce reads. For public content only discovery, probe public Store API catalog routes before declaring commerce deferred: wc/store/v1/products and wc/store/v1/products/categories are in-scope public commerce data when present. Cart and checkout Store API routes remain out of scope as runtime session state.

  6. Plugin coverage runs automatically. Plugin handling is a deterministic pre-pass plus declarative profiles, not prose guesswork — see "Plugin coverage" below. The capture script writes plugin-inventory.json and plugin-coverage.json alongside the per-entity files. Never hand-map a plugin from memory; consult the profiles through scripts/plugin-knowledge.js.

  7. Localhost sources and media URLs. A source at localhost, 127.0.0.1, or another private-only host is valid for discovery and source reads from the user's machine. However, Wix Media import fetches files from the URL using Wix servers, so media URLs like http://localhost:8090/wp-content/uploads/... are not reachable by Wix during a live import. This is optional setup and, as far as we know today, only affects media import:

    • Prefer exposing the local source through a temporary public HTTPS tunnel such as ngrok before live media import.

    • Or explicitly skip/defer media import and continue with non-media entities.

    • If using ngrok on macOS:

      1. Install: brew install ngrok

      2. Add an authtoken from the ngrok dashboard: ngrok config add-authtoken "<YOUR_AUTHTOKEN>"

      3. Expose the local source port, for example: ngrok http 8090

      4. Set the source base URL to the HTTPS forwarding URL: export WP_BASE_URL=https://<id>.ngrok-free.app Record this in source-profile.md when the captured source URL is localhost, and note whether media will use the tunnel or be skipped/deferred.

The raw capture is evidence, not a hand-off artifact. rp-discovery synthesizes it into the canonical artifacts and records traceability pointers (rawDiscovery, per-entity rawFile).

Plugin coverage

A real WooCommerce site is mostly plugins. Handling them is deterministic and has its own knowledge base: plugins/ (profiles + no-migration-needed.json + README.md), read through scripts/plugin-knowledge.js, detected by scripts/wp-plugin-inventory.js.

Every installed plugin lands in exactly one of the four statuses, and every status produces a row the user sees. Nothing is silently ignored.

PopulationEvidenceResult
recognizeda profile matchednamed entities, declared read channels, Wix target refs; mapping confirmed
derivedno profile, data is REST-visiblederived from wp/v2/types + wp/v2/taxonomies, mapping proposed (CMS, or native on a domain-KB match)
named onlydetected, no read channelPending with its reason, resolved by the no-migration-needed list or at the review gate

A plugin therefore does not need a profile to migrate — it needs one to migrate natively.

Detection

Runs before route classification so profile-declared routes are already in scope. Signals, strongest first:

  1. GET /wp/v2/plugins — the authoritative installed list (plugin, status, name, version). Administrator credential required. On 401/403 the run continues and records pluginListAvailable: false; say so plainly rather than implying full coverage. Without it, installed-but-unprofiled plugins cannot be enumerated at all — this is the concrete argument for the authenticated acquisition mode.

  2. Declared routes present in the REST index.

  3. GET /wp/v2/types / GET /wp/v2/taxonomies entries matching a profile's restBases.

  4. Record payload keys from the samples — a second pass after sampling. This is not optional polish: several major WooCommerce extensions (Product Bundles, Composite Products, Product Add-Ons, ACF, Yoast) add no REST route at all and only widen wc/v3/products / wc/v3/orders payloads. Route-based discovery cannot see them.

  5. REST namespaces and public /wp-content/plugins/<slug>/ asset paths (low confidence, but they work with no credentials).

A plugin version below a profile's detect.minVersion is reported as api-below-min-version, not read as if the documented API were present.

Read channels

plugin-rest, core-cpt, core-embedded, core-meta, plugin-rest-child, export-file, db-only — see plugins/README.md. Two consequences worth stating to the user:

  • Unregistered post meta is invisible. WordPress exposes meta only when the plugin registered it with show_in_rest (and, for a CPT, declared custom-fields support). A plugin can keep its entire per-record state in postmeta and expose none of it. That data is reachable only from a WXR export or the database.

  • WXR cannot be fetched. Application Passwords authenticate the REST API and XML-RPC only, never wp-admin, so an export file is something the user produces and supplies. Treat export-file as a request to the user, never as a download.

  • Parent-scoped sub-resources (plugin-rest-child, fixed 2026-08-11). WooCommerce order notes (/wc/v3/orders/{id}/notes) and similar per-parent sub-collections cannot be listed on their own — the base classifier only samples flat collection routes (page/per_page shape). This is why a plugin that writes real data via $order->add_order_note(...) (e.g. Custom Payment Gateway for WooCommerce's payment-note field) used to report as pending · cannot-tell even though the data is real and REST-reachable in principle. plugin-rest-child fixes this: an entity declares route as a {parentId}-templated path (/wc/v3/orders/{parentId}/notes) plus parentRoute (the already-sampled collection that supplies real parent ids, e.g. /wc/v3/orders). Availability is a two-part presence check against the site's REST index — parentRoute is in scope, and the index advertises a route shaped like the template (WordPress's (?P<id>[\d]+)-style regex segments are normalized to {parentId} for the comparison, so the parameter's name never has to match). Presence alone does not confirm real data exists there: wp-discovery.js's sampleChildEntities runs a live, representative check afterward — it substitutes up to 3 already-sampled parent ids into the template and fetches each, purely to say "N of 3 sampled parents actually returned something," not to claim a full count. That result surfaces as a plain-language run note, never as a channel-status change: a small sample coming back empty does not mean the capability is absent, only that this sample did not confirm it. The infrastructure is built and tested (plugin-knowledge.js, wp-route-classifier.js's childRouteAdvertised, wp-plugin-detect.js's describeProfiledEntity, wp-discovery.js's sampleChildEntities), and plugins/woocommerce-other-payment-gateway.json is authored and live-verified against the reference store (a real order id substituted into the template found 2 of 3 sampled orders had matching notes) — do not guess a plugin's installed-directory id when authoring a similar profile; confirm detect.pluginFileIds against a live GET /wp/v2/plugins response first, it is exactly the kind of fact a stale or invented guess silently gets wrong.

  • Non-standard response envelope (responseEnvelope, fixed 2026-08-11). Sampling and counting assume a flat array (X-WP-Total/X-WP-TotalPages headers, or the array's own length) or a single object. MailPoet's REST API (/mailpoet/v1/subscribers, /segments, /newsletters, ...) broke that assumption: it is a real, paginated, GET-only REST route (VERIFIED LIVE 2026-08-11: 306 real subscribers on the reference store, readable with the standard Application Password), but the payload is wrapped as { data: { items: [...], meta: { count, pages } } } with no X-WP-Total header — the count lives inside the body instead. Before this fix the whole envelope would have sampled as one opaque record. A profile entity (route-bearing channels only) now declares responseEnvelope: { itemsPath, countPath } — a dot-path to the array of records, and an optional dot-path to the true total when there's no header. wp-discovery.js's inspectEntity unwraps to that path and otherwise treats it exactly like a flat array; a path that stops resolving (stale profile, plugin version drift) falls back to the raw payload shape and records a discovery note rather than failing the run. plugins/mailpoet.json is authored and live-verified against the reference store: crm.email-subscription now resolves to migration-planned via the existing crm/email-subscription target, with recordCount: 306 read via the declared countPath. A namespace-wide unprofiledRoutes entry is still a sign a route this shape (or any other) has never been profiled — check there before concluding a plugin has "no REST surface."

  • Route default query (ROUTE_DEFAULT_QUERY_RULES, fixed 2026-08-16). Sampling sends per_page and nothing else, so any collection route that applies a default filter to an unparameterized request is read as its filtered subset and the plan under-counts — the hidden records are invisible to the mapper, not merely misreported. Observed on /wc/v3/products/reviews, which defaults to status=approved: the reference store has 120 reviews (114 approved + 6 on hold) and discovery counted 114. This is a class of bug, so the fix is a table rather than a special case: wp-route-classifier.js carries ROUTE_DEFAULT_QUERY_RULES — [pattern, params, reason], *-suffix matching, longest pattern wins — and defaultQueryFor(routePath) / defaultQueryReasonFor(routePath) resolve it. wp-discovery.js merges the result under its paging parameters and records a discovery note naming the parameters and the reason, so generated readers know to send them too. Adding a route is one row in the table plus a fixture; a route with no row is unchanged.

Coverage statuses

The four statuses, and only the four: migration-planned (via api or cms, confidence confirmed or proposed), no-need-to-migrate, pending, requires-development. A failed or unavailable read is never a status — it attaches to the row as blocked[] (user-file / surface-changed, with a declined flag).

The split is deliberate: pending (we do not know how to migrate this yet — our open item) and requires-development (a human established Wix has no surface) call for different conversations. Only the second is a closed door, and only a human may open it — the human-signed register plugins/requires-development.json is its single source.

Interaction rules
  • The admin Application Password is the only source credential. A plugin REST namespace that honours WordPress authentication works with it, and that is the normal case — plugins with their own key systems offer them as an alternative for external callers, not a requirement (verified for Gravity Forms, which accepts Application Passwords and runs requests under the caller's plugin capabilities). Do not treat "this plugin has API keys" as "we need another credential"; that reasoning has been wrong every time it was applied. If a plugin genuinely rejects the platform credential, that is a config-gate requirement like the WooCommerce consumer keys — not a per-capability runtime state.

  • blocked[] entries are collected and asked once, batched, each individually skippable. A user-file blocker is the one state no credential can fix: unregistered post meta and plugin tables are unreachable by any WordPress API, and Application Passwords cannot reach wp-admin, so a WXR or CSV export must be produced by the user. Record each answer in orchestration/decisions.json under pluginBlocker:<capability>:<kind> (provided / declined); wp-discovery.js reads it back (--decisions, defaulting to <out-dir>/../../orchestration/decisions.json) so a declined ask renders as declined.

  • migration-planned · proposed rows never block; the proposed capability and target are reviewed at the normal mapping-review checkpoint.

  • requires-development and pending rows must reach the user. A detected but undeliverable capability the user was never told about is the failure this machinery exists to prevent. Every pending row is decided at the mapping review — the only exit.

A recognized plugin always ends in Migration planned (J2 property 1). If a profile matched we know what the plugin holds, so:

  • no readable channel (plugin tables only) → still classified by its target, with a user-file blocker on the row — not pending, and never a "cannot" verdict. A database export or a source-side bridge would reach it, and automation may not foreclose that any more than it may declare Wix incapable.

  • pending · cannot-tell is reserved for an unrecognized plugin where we genuinely found nothing; the no-migration-needed list or the agent's own reading can still resolve it to No need to migrate with a recorded rationale.

A CMS destination is not turnkey. "Kept as data" means the records land in a Wix CMS collection with their original IDs — genuinely migrated, not documented. But Wix Data must be installed first (item writes fail with WDE0110 otherwise) and collection creation has no verified writer yet, so it is a setup step. Say both on the row; a customer reading "Kept as data" should not discover the setup work later.

Guardrails
  • Never a silent native mapping. A derived entity may target a native Wix entity only when the Wix domain knowledge confirms its proposed capability; otherwise it goes to CMS. Either way the row is confidence: proposed and is confirmed at the mapping review.

  • Never a scope reopening. The generic path operates only on routes the route classifier already accepted. It does not resurrect frontend, editor, admin, runtime, or integration families because a plugin registered them.

  • Profile data routes outrank exclusion families (that is the per-capability opt-in), but a wildcard pattern must keep two concrete leading segments, so /yoast/* can never be opted in wholesale.

Commands
node scripts/plugin-knowledge.js list-plugins
node scripts/plugin-knowledge.js read-plugin --slug the-events-calendar
node scripts/plugin-knowledge.js resolve-route --route /tribe/events/v1/events
node scripts/plugin-knowledge.js resolve-property --property bundled_items
node scripts/plugin-knowledge.js list-capabilities
node scripts/wp-plugin-inventory.js --base-url <url> --out-dir <dir> [auth options]
node scripts/plugin-knowledge-validate.js --write-index

To add or correct a plugin, edit plugins/<slug>.json and add a fixture — no skill logic changes. See plugins/README.md.

Read contract (codegen-time)

What a generated WordPress reader must get right. Capture the operational facts below into source-profile.md during discovery so codegen has them without re-deriving.

The generated reader is an extractor, not an in-memory bulk loader. It should fetch WordPress/WooCommerce records page by page and write them to project-local files (for example per-entity paged JSON files plus a manifest) so the import step can read from disk later without re-fetching the source.

Reuse the shared transport — do not regenerate it. The auth, URL building, rate-limit throttling, and Retry-After-aware 429/503 backoff a reader needs already exist as a dependency-free module at lib/wp-http.js in this skill directory (the same module the capture script imports). It exports fetchJson, buildHeaders, configureRateLimit, and parseTotalHeader. Any generated WordPress reader must reuse this module rather than reimplementing transport, so the reader contains only per-project orchestration: which entities to pull, the pagination loop, _embed/_links resolution, and transform glue. One tested transport core is what makes the sampler and the reader behave identically. How the module is carried into a runnable migration project is rp-import-codegen's concern (its File targets), not this adapter's. The notes below describe what the reader does on top of that shared core:

  • Namespaces & auth differ per namespace:

    • wp/v2 (core): HTTP Basic auth with a WordPress Application Password (--username + --application-password).

    • wc/v3 (WooCommerce): consumer key / secret, sent as Basic auth over HTTPS (or as query params on some hosts). This is a different credential from the Application Password — both may be needed for a full migration.

  • Pagination: ?page=N&per_page=M (max per_page is typically 100). Total pages are in the X-WP-TotalPages response header and total records in X-WP-Total — read those rather than guessing when to stop. Some public WooCommerce Store API collection routes paginate without X-WP-TotalPages; when that header is absent, generated readers must stop on the first page whose item count is smaller than per_page.

  • Embedded relations: request ?_embed to inline related resources, or follow the _links block (author, wp:featuredmedia, wp:term) to resolve relations. The evidence pointers in source-schema.json relations come from this _links block.

  • Hierarchical taxonomies: WordPress categories (and custom hierarchical taxonomies) carry a parent field on each term (0 = top-level). When any term has a non-zero parent, the source taxonomy is nested. Discovery must elevate this into structured schema — set "hierarchical": true on that entity in source-schema.json (see source-schema.example.json → category) rather than leaving parent buried in the raw dump. The Wix Blog category target is flat (no parent/child), so this flag is what triggers the mapper's mandatory lossiness entry; without it, the flatten happens silently.

  • Rate limits / retries: not advertised; the capture script throttles (--rate-limit-rpm, default 120) and backs off on 429/503 honoring Retry-After. Generated readers should inherit the same discipline.

  • Rich content: content.rendered / title.rendered are HTML; *.raw requires context=edit (authenticated). Note which the reader should pull.

  • HTML entities in "plain text" fields (trap, hit live 2026-07-19): WordPress returns HTML-encoded entities (–, &, ’, …) not only in rendered HTML but also in fields consumed as plain text — product/category/tag name, title.rendered after tag-stripping, excerpts, even SKUs. Values sent to plain-text Wix fields (product name, blog title, tag label, CMS text columns) must be entity-decoded by the generated transforms or the encoded form appears verbatim in the Wix dashboard. HTML passed to rich-content conversion does NOT need pre-decoding — the converter handles entities.

  • Custom fields: ACF / meta often appear in sample records but are absent from the OPTIONS schema — surface them as unknowns in discovery so the mapper can decide.

  • WooCommerce variation attribute values are URL-encoded slugs, not display names (trap, hit live 2026-07-21): variations[].attributes[].value from wc/v3/products/{id}/variations is a URL-encoded taxonomy-term slug (e.g. 1-%d7%a7%d7%92 for 1 ק"ג), not the human-readable display name that the product's attributes[].options[] array contains. Generated readers must build a per-option slug→displayName map from the parent product's attributes[].options[] (which does carry display names) and resolve slug values to display names before writing to Wix. Passing slugs directly causes MISSING_VARIANT_OPTION_CHOICE because Wix compares variant choice names against option choice names and finds no match.

  • WooCommerce "Any"-style variations have null attribute values (trap, hit live 2026-07-21): When a WooCommerce variation is set to "Any" for an option (the variation applies to any value of that option), variations[].attributes[].value is an empty string or null, not a specific term. Generated transforms that filter variants by attribute value will silently drop "Any" variants, leaving options with no variants — Wix then auto-generates priceless placeholder variants, causing price-empty errors. Fix: when ALL attributes for a variation are null/"Any", treat the variation as a single cartesian entry covering all option choices at the variation's price, rather than filtering it out.

  • Route paths passed to fetchJson / buildApiUrl must NOT include /wp-json (trap, hit live 2026-07-21): buildApiUrl in lib/wp-http.js already prepends /wp-json to the routePath argument. Generated route paths must start with the namespace directly (e.g. /wc/store/v1/products, /wp/v2/posts) — never with /wp-json/.... Prefixing with /wp-json doubles the prefix and produces 404s.

  • WooCommerce consumer key/secret can 401 on some wc/v3 routes even when it reads others fine (trap, hit live 2026-08-12): WC_CONSUMER_KEY/WC_CONSUMER_SECRET are scoped at key-creation time (Read / Write / Read-Write) and can be narrower than the WordPress Application Password's access. On the reference store, the consumer key/secret 401'd woocommerce_rest_cannot_view on wc/v3/taxes, wc/v3/taxes/classes, and wc/v3/settings/tax while the very same reads succeeded immediately with the WP_USERNAME/WP_APPLICATION_PASSWORD Basic auth pair. Generated readers must not treat a 401/403 on one wc/v3 route as proof the whole consumer key is broken (which would wrongly block products/orders/coupons too) — retry that specific route with the Application Password credential before failing, and prefer the Application Password outright for admin-ish wc/v3 routes (taxes, settings) that a narrowly-scoped key is more likely to be denied on.

  • Core WooCommerce settings/tax routes are core, not plugin data: wc/v3/taxes, wc/v3/taxes/classes, and wc/v3/settings/tax are ordinary WooCommerce core collections (same auth/pagination rules as wc/v3/products etc.) — they are not profiled as a "plugin" because tax is core WooCommerce, not an extension. Per-product tax_status/tax_class fields ride along on the ordinary wc/v3/products read; no separate per-product route is needed to get them. See rp-target-wix domains/tax/ for the corresponding Wix target entities (Tax Group / Tax Region / Manual Tax Mapping / Tax Settings) and mapping-plan.json's product and tax-class entities for a live worked example (migrations/reference-run, 2026-08-12).

Schema shape

source-schema.example.json (in this skill folder) is the template rp-discovery follows when emitting migrations/<project>/source-schema.json. It is a shape to follow, not a strict schema to validate against. Keep the platform-agnostic core stable; push WordPress quirks (restNamespace, statuses, etc.) into each entity's open sourceMeta blob.

For a profiled plugin entity, sourceMeta MUST also carry requestMethod, requestBody, and responseFragmentGroupSize verbatim whenever the plugin profile declares them (spec 0044/0045) — copy them from the profile entity (surfaced structurally in plugin detection's per-entity output, wp-plugin-detect.js's describeProfiledEntity) rather than re-deriving them from discovery's prose notes. rp-import-codegen's read contract depends on finding these under exactly those sourceMeta keys; omitting them silently degrades a declared non-GET/fragmented read into an unreadable one downstream.

Files

plugins/membership-for-woocommerce.json

{
  "schemaVersion": 1,
  "plugin": "membership-for-woocommerce",
  "displayName": "Membership For WooCommerce",
  "profileVersion": "2026-08",
  "sourceOfTruth": "https://wordpress.org/plugins/membership-for-woocommerce/",
  "distribution": "wordpress-org",
  "capabilities": [
    "commerce.subscription-plans",
    "commerce.subscription-contracts"
  ],
  "detect": {
    "pluginFileIds": [
      "membership-for-woocommerce/membership-for-woocommerce"
    ],
    "routes": [
      "/wps-mfw/get-membership-offers",
      "/wps-mfw/get-user-membership"
    ],
    "restNamespaces": [
      "wps-mfw"
    ],
    "recordProperties": [
      "wps_membership_plan_with_product",
      "_wps_plan_id"
    ],
    "assetPathSlugs": [
      "membership-for-woocommerce"
    ]
  },
  "credentials": [
    {
      "key": "wps_membership_api_consumer_secret_keys",
      "description": "Plugin-specific API secret for the wps-mfw namespace, passed as a `consumer_secret` request parameter. Generated in the plugin's own settings and stored in the wps_membership_api_consumer_secret_keys option; the API must ALSO be switched on there (wps_membership_enable_api_settings option = 'on') or the routes are never registered at all. The admin Application Password does NOT authorize these routes — the permission callback hash_equals()-compares consumer_secret and nothing else, and returns false outright when no secret has been generated [DOCUMENTED: plugin source 3.1.2, package/rest-api/class-membership-for-woocommerce-rest-api.php wps_mfw_default_permission_check, read 2026-08-16]. Collecting this credential is nevertheless LOW VALUE for migration — see the post-only-plugin-api quirk: every route is POST, so a read-only discovery pass cannot use them regardless."
    }
  ],
  "entities": [
    {
      "entity": "membership-plan",
      "channel": "export-file",
      "candidateTargetRefs": ["pricing-plans/plan"],
      "pitfalls": [
        {
          "code": "not-rest-readable-export-required",
          "severity": "blocker",
          "summary": "Membership plans are posts of the custom type `wps_cpt_membership`, registered WITHOUT show_in_rest [VERIFIED IN PLUGIN SOURCE v3.1.2, admin/class-membership-for-woocommerce-admin.php register_post_type('wps_cpt_membership', ...) — the args set public/publicly_queryable/show_ui but never show_in_rest, so it defaults to false, 2026-08-16]. [VERIFIED LIVE 2026-08-16] the authed /wp/v2/types lists 34 types and neither wps_cpt_membership nor wps_cpt_members is among them, and GET /wp-json/wp/v2/wps_cpt_membership returns 404. With the plugin's own namespace also absent (see quirks), there is NO REST read for plan records: the channel is a user-supplied WXR export, which does carry the CPT and its postmeta because register_post_type leaves can_export at its true default. Treat a missing export as Blocked — recoverable (kind: user-file), not as an empty plan set."
        },
        {
          "code": "plan-field-map-to-pricing-plans",
          "severity": "warning",
          "summary": "Plan settings live in unregistered postmeta on the plan post [DOCUMENTED: plugin source 3.1.2, admin/class-membership-for-woocommerce-admin.php get_plans_default_value(), read 2026-08-16]. The fields that map onto pricing-plans/plan: post_title → plan.name (Wix caps it at 50 chars); post_content / wps_membership_plan_info → plan.description; wps_membership_plan_price → pricingVariants[0].pricingStrategies[0].flatRate.amount; wps_membership_plan_name_access_type ('lifetime' | 'limited') → billingTerms.endType (UNTIL_CANCELLED for lifetime; CYCLES_COMPLETED for limited); wps_membership_plan_duration + wps_membership_plan_duration_type ('days'|'weeks'|'months'|'years') → the billingCycle period/count pair, subject to that entity's billing-cycle-minimum-7-days pitfall; wps_sfw_subscription_free_trial_number + wps_sfw_subscription_free_trial_interval → freeTrialDays (convert to days); wps_sfw_subscription_initial_signup_price → pricingVariants[].fees[] FIXED_AMOUNT / FIRST_PAYMENT. NOTE the plugin reuses its sibling's wps_sfw_* prefix for the trial/signup keys — those are membership plan meta here, not Subscriptions-For-WooCommerce product meta."
        },
        {
          "code": "content-access-gating-has-no-plan-field",
          "severity": "warning",
          "summary": "The largest half of a WooCommerce membership plan does NOT fit pricing-plans/plan at all: the access rules. A plan carries wps_membership_plan_target_ids / _target_categories / _target_tags (gated products), _post_target_ids / _target_post_categories / _target_post_tags (gated posts), _page_target_ids (gated pages), plus member-benefit rules — wps_membership_plan_offer_price_type + wps_memebership_plan_discount_price (member discount, note the plugin's own 'memebership' typo in those two keys), wps_memebership_plan_free_shipping, wps_membership_plan_hide_products, wps_set_maximum_product_purchase_limit — and delayed-access controls (wps_membership_plan_access_type 'immediate_type', wps_membership_plan_time_duration/_type) [DOCUMENTED: plugin source 3.1.2 get_plans_default_value(), read 2026-08-16]. A Wix Pricing Plan is a paid offer; what it unlocks is configured on the page/blog/group side in the Editor and dashboard, not carried on the plan object. Recorded as a separate pending capability rather than declared in this profile's capabilities[] — see capabilities-pending-decision.json (commerce.membership-content-access) and the deliberately-undeclared-capability quirk."
        },
        {
          "code": "deduplicate-and-do-not-import-the-placeholder",
          "severity": "info",
          "summary": "Import one Wix plan per source plan post, and use pricing-plans/plan's idempotencyKey (GUID, derived deterministically from the source plan post id) so a retried import does not duplicate. Separately: skip the plugin's auto-generated 'Membership Product' — see the auto-created-placeholder-product quirk — it is scaffolding, not catalog."
        }
      ]
    },
    {
      "entity": "member-enrollment",
      "channel": "export-file",
      "candidateTargetRefs": ["pricing-plans/plan-order"],
      "relations": [
        {
          "relatedEntity": "membership-plan",
          "via": "plan_obj"
        }
      ],
      "pitfalls": [
        {
          "code": "not-rest-readable-export-required",
          "severity": "blocker",
          "summary": "Enrollments are posts of the custom type `wps_cpt_members`, registered without show_in_rest exactly as the plan type is [VERIFIED IN PLUGIN SOURCE v3.1.2, admin/class-membership-for-woocommerce-admin.php; VERIFIED LIVE 2026-08-16: absent from the authed /wp/v2/types, GET /wp-json/wp/v2/wps_cpt_members returns 404]. The full enrollment set is readable only from a user-supplied WXR export. A partial, REST-only reconstruction IS possible for purchase-created enrollments — see the membership-purchase-order-linkage entity — but it silently omits manually assigned members, so it is a fallback with a known hole, never a substitute."
        },
        {
          "code": "enrollment-record-shape",
          "severity": "warning",
          "summary": "The record is thin and mostly denormalized into meta [VERIFIED IN PLUGIN SOURCE v3.1.2, includes/class-membership-for-woocommerce-global-functions.php create_membership_for_customer() and wps_msfw_assigned_membership_by_user_id(), plus admin/class-membership-for-woocommerce-admin.php manual-add handler, 2026-08-16]: post_author is the WP user id (this, not a meta field, is the reliable member link on purchase-created records), post_title is a display user name, and the meta carries member_status ('pending' | 'complete' | 'hold' | 'cancelled', derived from the WooCommerce order status), member_expiry, member_order_id (the source WooCommerce order), member_actions, billing_details (an array of membership_billing_* fields), wps_member_user (the user id, written on the MANUAL assignment path only), and plan_obj. The reverse link also exists as user meta mfw_membership_id (an array of member post ids) on the WP user — also not REST-exposed."
        },
        {
          "code": "plan-obj-is-a-frozen-snapshot",
          "severity": "warning",
          "summary": "`plan_obj` is not a plan id: it is a full array merge of the plan post row (get_post ARRAY_A) with every one of the plan's postmeta values, snapshotted at enrollment time [VERIFIED IN PLUGIN SOURCE v3.1.2, same functions as above, 2026-08-16]. Two consequences. (1) The plan id must be recovered from plan_obj['ID'] and crosswalked to the Wix plan — do not create a Wix plan per enrollment. (2) Long-lived members can hold TERMS THAT DIFFER from the plan's current terms; if the snapshot's price/duration disagrees with the live plan post, that divergence is real historical fact, and grandfathered terms cannot be expressed on a Wix plan-order (which inherits the plan's terms). Ledger the divergence rather than silently re-pricing the member."
        },
        {
          "code": "status-and-lifecycle-mapping",
          "severity": "warning",
          "summary": "Per pricing-plans/plan-order: only ACTIVE-equivalent enrollments recreate natively via POST /pricing-plans/v2/checkout/orders/offline. member_status 'complete' → create the offline order with paid:true; 'pending'/'hold' → paid:false or hold for review; 'cancelled', and any record whose member_expiry is in the past, cannot be recreated in that state (status/endDate/cancellation are all read-only at create) and belong in CMS-only history. memberId is a hard dependency — the Wix members import must run first (400 MEMBER_DOESNT_EXIST) — and it is resolved from post_author via the member crosswalk, not from post_title."
        },
        {
          "code": "content-access-fidelity-caveat",
          "severity": "warning",
          "summary": "THE HEADLINE FIDELITY CAVEAT for this plugin. A WooCommerce membership is an ACCESS-CONTROL grant: the plan's target ids/categories/tags gate specific products, posts and pages and apply member-only discounts and free shipping, enforced per request. A Wix Pricing Plans order is a BENEFIT ENTITLEMENT: it records that a member holds a paid plan, and what that unlocks is configured separately on the page/blog/group being protected. Recreating enrollments as plan-orders therefore preserves WHO is entitled and to WHICH plan, and preserves nothing about WHAT that entitlement opens until the gating is reconfigured on the Wix side. Migrating enrollments without also reconfiguring gating leaves members holding plans that unlock nothing — surface this at the review gate, do not let it read as a clean subscription migration."
        }
      ]
    },
    {
      "entity": "plan-grant-product-linkage",
      "channel": "core-meta",
      "embeddedIn": ["/wc/v3/products"],
      "propertyPath": "wps_membership_plan_with_product",
      "candidateTargetRefs": [],
      "pitfalls": [
        {
          "code": "no-wix-target-decided",
          "severity": "warning",
          "summary": "A WooCommerce product can be configured to grant a membership plan when purchased; the chosen plan post id is stored in unregistered product meta `wps_membership_plan_with_product` [VERIFIED IN PLUGIN SOURCE v3.1.2, admin/class-membership-for-woocommerce-admin.php product-tab save handler, 2026-08-16]. Wix has no equivalent: a Pricing Plan is bought as a plan, and buying a Stores product does not confer one. There is no automation-writable rule connecting the two, so the linkage itself is unplaceable — the product migrates normally, the plan migrates normally, and the grant relationship is reportable loss or a CMS note. Also folded into the commerce.membership-content-access pending entry."
        },
        {
          "code": "the-only-rest-visible-plan-signal",
          "severity": "info",
          "summary": "Worth reading even though it has no target: this key is the ONLY REST-visible evidence of the plugin's plan data. When the user supplies no WXR export, scanning /wc/v3/products meta_data for wps_membership_plan_with_product yields the set of plan post ids that are purchasable, which is enough to report 'N membership plans exist and cannot be read' concretely instead of reporting nothing. It is a lower bound only — plans sold through the plugin's own plans page, and plans assigned manually, leave no product meta at all."
        }
      ]
    },
    {
      "entity": "membership-purchase-order-linkage",
      "channel": "core-meta",
      "embeddedIn": ["/wc/v3/orders"],
      "propertyPath": "_wps_plan_id",
      "candidateTargetRefs": ["pricing-plans/plan-order"],
      "pitfalls": [
        {
          "code": "partial-rest-fallback-for-enrollments",
          "severity": "warning",
          "summary": "When a membership is purchased, the plugin writes `_wps_plan_id` (the plan post id) and `_member_id` (the wps_cpt_members post id) onto the FIRST line item of the order [VERIFIED IN PLUGIN SOURCE v3.1.2, public/class-membership-for-woocommerce-public.php wps_msfw_membership_update_meta_data(), wc_add_order_item_meta on $keys[0], 2026-08-16]. Both keys ride in wc/v3/orders line_items[].meta_data, which makes this the one REST-readable path to enrollment facts: order.customer_id gives the member, _wps_plan_id gives the plan, order.date_created gives the start date, and order.status approximates member_status. That is the full input set pricing-plans/plan-order needs (planId + memberId + startDate + paid). Use it as the fallback when no WXR export is supplied."
        },
        {
          "code": "fallback-omits-manual-and-lifecycle-data",
          "severity": "warning",
          "summary": "Two holes that make this a fallback, not a source of truth. (1) Manually assigned memberships — created from the admin Members screen or by wps_msfw_assigned_membership_by_user_id() — never touch an order, so they are invisible here entirely. (2) The order records the PURCHASE, not the current state: member_expiry, later status changes (admin cancellation, expiry sweeps, pause) and renewals live only on the wps_cpt_members record, so an order-derived enrollment can be stale — importing an expired membership as ACTIVE is the concrete failure mode. Cross-check member_expiry from the export whenever one exists; when it does not, ledger every order-derived enrollment as unverified state."
        },
        {
          "code": "first-line-item-only",
          "severity": "info",
          "summary": "The meta lands on the first line item of the order regardless of which line actually was the membership product [VERIFIED IN PLUGIN SOURCE v3.1.2: `$keys = array_keys( $items ); wc_add_order_item_meta( $keys[0], ... )`]. Do not infer the membership product from the line item carrying the key, and do not expect the key on every line of a mixed order — read it as an order-level fact that happens to be stored on one line."
        },
        {
          "code": "sampling-may-miss-linkage",
          "severity": "info",
          "summary": "Present only on orders that bought a membership. [VERIFIED LIVE 2026-08-16] none of the 150 orders on the test site carries _wps_plan_id or _member_id, so absence here is genuinely 'no membership sales', not surface drift. The channel mechanism itself is live-proven on this site: custom underscore-prefixed line-item meta (`_reduced_stock`) does appear in wc/v3/orders line_items[].meta_data [VERIFIED LIVE 2026-08-16]."
        }
      ]
    }
  ],
  "quirks": [
    "Plugin file id is `membership-for-woocommerce/membership-for-woocommerce` [VERIFIED LIVE 2026-08-16 against the reference store: plugin active, version 3.1.2, textdomain membership-for-woocommerce, vendor WP Swings]. Asset path detection works with no credentials: GET /wp-content/plugins/membership-for-woocommerce/public/css/membership-for-woocommerce-public.css returned 200 [VERIFIED LIVE 2026-08-16] while the directory's readme.txt returned 403, so probe a real asset, not the readme.",
    "STORAGE MODEL — everything durable is core WordPress posts + UNREGISTERED postmeta, and almost none of it is REST-visible. (a) Plans: CPT wps_cpt_membership, no show_in_rest. (b) Enrollments: CPT wps_cpt_members, no show_in_rest, member linked by post_author. (c) Plan and member settings: plain postmeta, with zero register_post_meta / register_meta / show_in_rest calls anywhere in the plugin [VERIFIED IN PLUGIN SOURCE v3.1.2, grep across the package, 2026-08-16 — the only register_meta_box_cb hits are admin metaboxes, not REST registration]. (d) The two REST-visible crumbs are WooCommerce-side: product meta wps_membership_plan_with_product and order-line-item meta _wps_plan_id / _member_id, both surfaced by WooCommerce's own meta_data arrays rather than by anything this plugin registers. There are no custom database tables (no CREATE TABLE in the source), so a WXR export is a complete read — which is what makes export-file the right channel here rather than db-only.",
    "THE PLUGIN'S OWN REST API IS OFF BY DEFAULT AND POST-ONLY. It registers namespace `wps-mfw` (no version segment — the routes are /wps-mfw/mfw-dummy-data/, /wps-mfw/get-membership-offers/, /wps-mfw/get-user-membership) but only when the option wps_membership_enable_api_settings === 'on' [DOCUMENTED: source 3.1.2, package/rest-api/class-membership-for-woocommerce-rest-api.php wps_mfw_add_endpoint(), read 2026-08-16]. [VERIFIED LIVE 2026-08-16] on the reference store the toggle is off: `wps-mfw` is absent from the 93 namespaces the REST index advertises and all three routes GET 404 — so restNamespaces/routes here are real but frequently-absent detection signals, and their absence must NOT be read as the plugin being missing. Even when enabled they are unusable by this system's read-only discovery: every route is registered as WP_REST_Server::CREATABLE (POST), so there is no GET form to sample. Their payloads are thin projections anyway — get-membership-offers returns {plan_name, plan_type, plan_price, plan_duration} per plan and get-user-membership returns one user's plan summary [DOCUMENTED: package/rest-api/version1/class-membership-for-woocommerce-api-process.php, read 2026-08-16] — carrying none of the access rules, expiry, or billing state a migration needs.",
    "AUTO-CREATED PLACEHOLDER PRODUCT — the activator inserts a WooCommerce product named 'Membership Product' (slug membership-product, simple, virtual, price 0, description 'Auto generated product for membership please do not delete or update.') and stores its id in the wps_membership_default_product option; it is the cart vehicle for plan purchases, not catalog [VERIFIED IN PLUGIN SOURCE v3.1.2, includes/class-membership-for-woocommerce-activator.php]. [VERIFIED LIVE 2026-08-16] it exists on the test site as product id 2127, slug membership-product, type simple, status publish, virtual true — i.e. it is publicly listed, not private, so a naive product migration WILL carry a junk product across. Exclude it by slug/option id at mapping time and report the exclusion rather than dropping it silently.",
    "DELIBERATELY UNDECLARED CAPABILITY — the content-access half of this plugin (plan-gated products/posts/pages, member-only discounts, member free shipping) is proposed as `commerce.membership-content-access` in capabilities-pending-decision.json and is intentionally NOT listed in this profile's capabilities[]. Reason, per the precedent recorded on the commerce.gift-card-activity pending entry: classifyCoverage unions a plugin's capabilities across ALL its entities, so an unplaced capability declared on a profile whose other entities do carry target refs would misclassify as migration-planned via api instead of pending. The pitfalls above are where that gap stays visible.",
    "VENDOR FAMILY OVERLAP — WP Swings ships this alongside Subscriptions For WooCommerce, and the two share code lineage: this plugin's meta helper wps_membership_get_meta_data() branches on OrderUtil::get_order_type() and has an explicit `wps_subscriptions` branch constructing a WPS_Subscription object, and its plan field registry reuses the wps_sfw_* prefix for trial/signup keys [VERIFIED IN PLUGIN SOURCE v3.1.2, membership-for-woocommerce.php lines 353-400 and admin get_plans_default_value(), 2026-08-16]. Both plugins are active together on the test site. Consequence for detection and for reading: a wps_sfw_* key found on a MEMBERSHIP PLAN post belongs to this plugin, while the same-named key on a PRODUCT belongs to subscriptions-for-woocommerce — do not attribute by prefix alone. This plugin registers no custom order type of its own (no wc_register_order_type call anywhere in the source), so `wps_subscriptions` records seen on a site come from the sibling plugin.",
    "[NEEDS-VERIFICATION] every payload-shape claim above rests on the published 3.1.2 source, not on a live record: the test site has the plugin active but zero membership plans, zero member records, and zero membership sales (205 products carry no wps_membership_plan_with_product; 150 orders carry no _wps_plan_id / _member_id; both CPTs 404 over REST) [VERIFIED LIVE 2026-08-16]. Re-verify against a store with real membership data — in particular the plan_obj snapshot shape and the member_expiry format — before promoting this profile's field lists to a contract."
  ]
}

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs Node.js

Security

What our scanner noticed· Medium risk

  • Possible data-exfiltration endpoints
  • Scripts that your agent may run

This skill includes scripts that your agent may run. Read them before you use it.

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
Wix
Publisher
Wix (Official)
Source
wix/skills · wix-replatform/resources/rp-source-wordpress · commit d168bc2
Licence
MIT License (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Wix or Wix.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download rp-source-wordpress.zip