# 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cottoncast.com/plugins/woocommerce.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
