# WooCommerce

URL: https://docs.sparklayer.io/help/platforms/woocommerce
Applies to: WooCommerce

Add B2B and wholesale ordering to WooCommerce with the SparkLayer plugin: what works on WooCommerce, how setup works, its limitations and the demo store.

> **Quick summary**
>
> - The SparkLayer plugin adds B2B pricing, a B2B cart and an account area to your existing WooCommerce store. Retail (DTC) shoppers see your store as it is today.
> - It works with WooCommerce 9 or later on WordPress 6 or later, with PHP 8.2 or later, on the Starter to Enterprise SparkLayer plans. WooCommerce support is in early access.
> - A customer becomes a B2B customer when their WordPress user has a `SparkLayer B2B` role.
> - Your store needs HTTPS and a permalink setting other than **Plain**: see [WooCommerce limitations](https://docs.sparklayer.io/help/platforms/woocommerce/limitations.md).

## How SparkLayer works on WooCommerce

You install the SparkLayer plugin on your WordPress site and connect it to SparkLayer with WooCommerce REST API keys. SparkLayer then syncs your products and B2B customers.

On a block theme, the plugin adds the widgets to your store automatically. On other themes, they go in your theme files: our team adds them free of charge, or your developer can. You keep your theme, and can run retail and B2B from the same store.

You manage B2B prices and ordering rules in the [SparkLayer Dashboard](https://docs.sparklayer.io/help/dashboard.md). Products, customers and orders stay in WooCommerce.

## Install at a glance

Setting up SparkLayer on WooCommerce:

1. **Install the plugin**: Upload it to your WordPress site
2. **Connect your store**: Register, then enter your store URL and REST API keys
3. **Assign roles**: Give B2B customers a SparkLayer B2B role
4. **Check the widgets**: Added automatically on block themes
5. **Set prices and launch**: Price lists, customer group rules and a test order

The full steps are in [Install SparkLayer on WooCommerce](https://docs.sparklayer.io/help/platforms/woocommerce/install.md). You only need a developer if your theme isn't a block theme. If you need help creating the API keys, [contact us](https://docs.sparklayer.io/help/support.md).

## What's specific to WooCommerce

| Topic | On WooCommerce | |
| --- | --- | --- |
| **Installing** | A WordPress plugin, connected with WooCommerce REST API keys. | |
| **B2B customers** | WordPress users with a `SparkLayer B2B` role, such as **SparkLayer B2B: Base**. | |
| **Customer groups** | Each SparkLayer customer group has a matching role in WordPress. | |
| **Widgets** | Added automatically on block themes; otherwise added to your theme files by our team (free of charge) or your developer. | |
| **Orders** | Created in WooCommerce under **Orders**, with a **SparkLayer Order Information** section. | |
| **Billing** | In the SparkLayer Dashboard, in the plan card at the foot of the sidebar. | |
| **Metafields** | Turned on in the SparkLayer Dashboard, at **Integrations > Platform > Metafields** in the SparkLayer Dashboard ([open](https://app.sparklayer.io/configuration/integrations/platform)), or **SparkLayer Wholesale > Integrations > Platform > Metafields** in the Shopify app. | |

## Limitations

The main differences from other platforms:

- Every product needs a unique SKU.
- Price lists can only be managed in SparkLayer.
- The plugin only works on stores with HTTPS turned on and a WordPress permalink setting other than **Plain**.

See [WooCommerce limitations](https://docs.sparklayer.io/help/platforms/woocommerce/limitations.md) for the full list, and [Compare platforms](https://docs.sparklayer.io/help/platforms/compare.md) to check a feature across platforms.

## Try the WooCommerce demo store

See SparkLayer on a working WooCommerce store that sells to both retail and B2B customers. Go to the [demo store's My account page](https://demo.woocommerce.sparklayer.io/my-account/) and sign in as a B2B customer with these details:

| Field | Value |
| --- | --- |
| **Email** | `woocommerce@sparklayer.io` |
| **Password** | `I6qxPvpww42#3hsz0hTC%U2b` |

## WooCommerce guides

- [Install SparkLayer on WooCommerce](https://docs.sparklayer.io/help/platforms/woocommerce/install.md): Install the plugin, connect your store and assign B2B roles
- [FAQs](https://docs.sparklayer.io/help/platforms/woocommerce/faqs.md): Plans, themes, products and orders on WooCommerce
- [Limitations](https://docs.sparklayer.io/help/platforms/woocommerce/limitations.md): What works differently, or isn't supported, on WooCommerce
- [Metafields and data mapping](https://docs.sparklayer.io/help/platforms/woocommerce/metafields.md): Turn on pack sizes, RRP, credit limits and order data
- [Cancel, uninstall or transfer](https://docs.sparklayer.io/help/platforms/woocommerce/uninstall.md): Cancel SparkLayer or move it to another store
