# WooCommerce

## Introduction

WooCommerce is popular e-commerce plugin for Wordpress. As you may know, It has a huge community that you can depend on for plugins and support.

#### Requirements

An integration always has two sides. You need to create a sales channel in your Cottoncast account. And your WooCommerce store needs our plugin.<br>

## Create sales channel

* [ ] Goto our app and [login](https://studio.cottoncast.com/sign/in)
* [ ] Goto **Settings > Sales channels**&#x20;
* [ ] Click **Add a new channel**
* [ ] Enter a **description,** choose a **language** and click **add WooCommerce channel**
* [ ] Enter your shop's **domain**
* [ ] Click **save**<br>

{% hint style="info" %}
Keep the tab open. You will need the Channel ID and Secret in the next step.
{% endhint %}

## Install plugin&#x20;

#### Download

You can download and install the plugin via your WooCommerce store's admin.

[Download plugin](https://plugins.cottoncast.com/cottoncast-woocommerce_latest.zip)

#### Composer

The plugin can also be installed and maintained using composer.

```bash
composer require cottoncast/woocommerce
```

{% hint style="info" %}
Don't forget to activate the plugin.
{% endhint %}

## Configure plugin

You will need the **channel ID** and **secret** from the created sales channel in the previous step.Goto **Settings > Sales channels** in your CottonCast account. Select the sales channel for your store.&#x20;

#### Configure cottoncast plugin

Goto **settings > Cottoncast** in your WooCommerce store.

You will see at least these settings:

| **Setting**     | Description                                       |
| --------------- | ------------------------------------------------- |
| Username        | Should match **channel ID**                       |
| Secret          | Should match **secret**                           |
| Order endpoint  | https\://*api.cottoncast.com*/order               |
| Config endpoint | https\://*api.cottoncast.com*/integrations/config |

That's it. You are done. Your shop and our system are now talking to each other.

## Bugs & Features

The plugin is publicly maintained at [Github](https://github.com/cottoncast/woocommerce). If you have found any bugs or want to request a feature you can do so on [Github](https://github.com/cottoncast/woocommerce).

## Common issues

### Cronjob

Make sure to disable WP\_CRON and use a proper cronjob.

### PHP Limits

Our plugin downloads images and processes them. That takes some time, memory and computing power. Make sure the plugin does not hit any limits.
