Skip to content

From WooCommerce

The WooCommerce importer pulls products, customers, orders, and inventory from a WooCommerce store via the REST API.

  1. WooCommerce 3.0+ with REST API enabled
  2. Consumer key and consumer secret (generate in WooCommerce → Settings → Advanced → REST API)
  3. API access with read permissions for products, customers, orders
Terminal window
rcommerce import platform woocommerce \
--api-url https://your-store.com \
--api-key ck_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
--api-secret cs_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
--entities products,customers,orders \
--overwrite
  • Title, description, SKU, price, weight, dimensions
  • Product images (downloaded to local storage)
  • Categories and category relationships
  • Variants and option values
  • Bundle components (for WooCommerce bundled products)
  • Name, email, phone
  • Billing and shipping addresses
  • Metadata
  • Line items with product references
  • Order status (mapped to rCommerce status)
  • Shipping and billing addresses
  • Payment status
  • Stock quantities per product
  • Managed stock flag

WooCommerce bundles are expanded:

  • Parent line carries the bundle price (no inventory reservation)
  • Component lines at $0 reserve underlying product stock

After import, re-sync bundle inventory:

UPDATE products pp
SET inventory_quantity = GREATEST(0, FLOOR(bp.inventory_quantity / 5.0)::integer)
FROM products bp
-- Adjust the slug/SKU conventions below to match how your bundles are named
WHERE pp.slug LIKE '%-bundle'
AND bp.sku = REPLACE(pp.sku, '-BUNDLE', '')
AND bp.is_active = true;
WooCommercerCommerce
pendingpending
processingconfirmed
on-holdon_hold
completedcompleted
cancelledcancelled
refundedrefunded

Preview what would be imported:

Terminal window
rcommerce import platform woocommerce \
--api-url https://your-store.com \
--api-key ck_xxx \
--api-secret cs_xxx \
--entities products \
--dry-run

Use --overwrite to update existing records (matched by SKU for products, email for customers). This is useful after fixing weight data or updating inventory.

When the importer downloads a product image to local storage, the URL it writes into product_images.src is built from the IMAGE_BASE_URL environment variable:

Terminal window
IMAGE_BASE_URL=https://images.shop.example.com rcommerce import platform woocommerce ...

Always set it explicitly per store (typically an R2/CDN URL) before importing — there is no reliable default, or every image row will point at the wrong host. See Image hosting on R2.

  • Only customer-role users import. The WooCommerce /customers endpoint returns users with the customer role only — shop managers and administrators are not imported. If an admin account needs to exist in rCommerce, register it manually and promote the role:

    UPDATE customers SET role = 'admin' WHERE email = '[email protected]';
  • WPML translation duplicates. Multilingual WooCommerce stores import every language variant as a separate product. After import, deactivate (or delete) the non-canonical translations so the catalog has one product per slug — otherwise sitemaps and category pages list duplicates.

  • Reviews attach to translation products. Imported reviews may be linked to a translation product rather than the canonical one, which splits review counts/ratings across duplicates. Consolidate after deduplicating translations.

  • Imported customers have no password. Migrated customers are flagged is_imported = true with no password_hash; on first login the API returns 403 account_requires_password_reset and the customer must go through the password-reset flow. The flag clears once a password is set.