> For the complete documentation index, see [llms.txt](https://docs.hostinger.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hostinger.com/wordpress/hostinger-plugins/ai-plugin/abilities/woocommerce-coupons.md).

# WooCommerce Coupons

WooCommerce Coupons abilities of the Hostinger AI plugin's WordPress site MCP server. Search, create, update and delete discount coupons, one at a time or in a batch.

Search, create, update and delete discount coupons, one at a time or in a batch.

**Available:** Only while WooCommerce is active on the site.

| Ability                                                               | What it does                                                               | Type                             |
| --------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------- |
| [Batch Update WooCommerce Coupons](#batch-update-woocommerce-coupons) | Create, update and delete several WooCommerce coupons in one request.      | **Destructive**                  |
| [Create WooCommerce Coupon](#create-woocommerce-coupon)               | Create a WooCommerce coupon from a code and discount details.              | Changes the site                 |
| [Delete WooCommerce Coupon](#delete-woocommerce-coupon)               | Move a WooCommerce coupon to the trash; it can be restored from the trash. | **Destructive** · Safe to retry  |
| [Get WooCommerce Coupon](#get-woocommerce-coupon)                     | Get one WooCommerce coupon by ID with all its fields.                      | Read-only                        |
| [Search WooCommerce Coupons](#search-woocommerce-coupons)             | Search and filter WooCommerce coupons with pagination.                     | Read-only                        |
| [Update WooCommerce Coupon](#update-woocommerce-coupon)               | Update a WooCommerce coupon; only the fields you pass change.              | Changes the site · Safe to retry |

## Batch Update WooCommerce Coupons

`hostinger-ai/wc-coupons-batch` · **Destructive**

Create, update and delete several WooCommerce coupons in one request.

No required parameters.

<details>

<summary>Optional parameters (3)</summary>

| Parameter | Type             | Description                                        |
| --------- | ---------------- | -------------------------------------------------- |
| `create`  | array of object  | List of coupon objects to create                   |
| `update`  | array of object  | List of coupon objects to update (must include id) |
| `delete`  | array of integer | List of coupon IDs to delete                       |

</details>

<details>

<summary>Description sent to AI tools</summary>

> Create, update and delete several WooCommerce coupons in one request. Use when asked to change many coupons at once. IDs for `update` and `delete` come from `hostinger-ai/wc-coupons-search`.

</details>

## Create WooCommerce Coupon

`hostinger-ai/wc-coupons-create` · Changes the site

Create a WooCommerce coupon from a code and discount details.

| Required parameter | Type   | Description  |
| ------------------ | ------ | ------------ |
| `code`             | string | Coupon code. |

<details>

<summary>Optional parameters (17)</summary>

| Parameter                     | Type                                            | Default      | Description                                                                                             |
| ----------------------------- | ----------------------------------------------- | ------------ | ------------------------------------------------------------------------------------------------------- |
| `amount`                      | number or string                                |              | The amount of discount. Should always be numeric, even if setting a percentage.                         |
| `status`                      | string                                          |              | The status of the coupon. Should always be draft, published, or pending review                          |
| `discount_type`               | one of `percent`, `fixed_cart`, `fixed_product` | `fixed_cart` | Determines the type of discount that will be applied.                                                   |
| `description`                 | string                                          |              | Coupon description.                                                                                     |
| `date_expires`                | null or string                                  |              | The date the coupon expires, in the site's timezone.                                                    |
| `individual_use`              | boolean                                         | `false`      | If true, the coupon can only be used individually. Other applied coupons will be removed from the cart. |
| `product_ids`                 | array of integer                                |              | List of product IDs the coupon can be used on.                                                          |
| `excluded_product_ids`        | array of integer                                |              | List of product IDs the coupon cannot be used on.                                                       |
| `usage_limit`                 | integer                                         |              | How many times the coupon can be used in total.                                                         |
| `usage_limit_per_user`        | integer                                         |              | How many times the coupon can be used per customer.                                                     |
| `free_shipping`               | boolean                                         | `false`      | If true and if the free shipping method requires a coupon, this coupon will enable free shipping.       |
| `product_categories`          | array of integer                                |              | List of category IDs the coupon applies to.                                                             |
| `excluded_product_categories` | array of integer                                |              | List of category IDs the coupon does not apply to.                                                      |
| `exclude_sale_items`          | boolean                                         | `false`      | If true, this coupon will not be applied to items that have sale prices.                                |
| `minimum_amount`              | number or string                                |              | Minimum order amount that needs to be in the cart before coupon applies.                                |
| `maximum_amount`              | number or string                                |              | Maximum order amount allowed when using the coupon.                                                     |
| `email_restrictions`          | array of string                                 |              | List of email addresses that can use this coupon.                                                       |

</details>

<details>

<summary>Description sent to AI tools</summary>

> Create a WooCommerce coupon from a code and discount details. Use when asked to add a discount or promo code.

</details>

## Delete WooCommerce Coupon

`hostinger-ai/wc-coupons-delete` · **Destructive** · Safe to retry

Move a WooCommerce coupon to the trash; it can be restored from the trash.

| Required parameter | Type    | Description                        |
| ------------------ | ------- | ---------------------------------- |
| `id`               | integer | Unique identifier for the resource |

<details>

<summary>Description sent to AI tools</summary>

> Move a WooCommerce coupon to the trash; it can be restored from the trash. Use when asked to remove a coupon. Needs `id` from `hostinger-ai/wc-coupons-search`.

</details>

## Get WooCommerce Coupon

`hostinger-ai/wc-coupons-get` · Read-only

Get one WooCommerce coupon by ID with all its fields.

| Required parameter | Type    | Description                        |
| ------------------ | ------- | ---------------------------------- |
| `id`               | integer | Unique identifier for the resource |

<details>

<summary>Description sent to AI tools</summary>

> Get one WooCommerce coupon by ID with all its fields. Use when you need the details of a known coupon. Needs `id` from `hostinger-ai/wc-coupons-search`.

</details>

## Search WooCommerce Coupons

`hostinger-ai/wc-coupons-search` · Read-only

Search and filter WooCommerce coupons with pagination.

No required parameters.

<details>

<summary>Optional parameters (8)</summary>

| Parameter  | Type                                                        | Default | Description                                           |
| ---------- | ----------------------------------------------------------- | ------- | ----------------------------------------------------- |
| `page`     | integer                                                     | `1`     | Current page of the collection.                       |
| `per_page` | integer                                                     | `10`    | Maximum number of items to be returned in result set. |
| `search`   | string                                                      |         | Limit results to those matching a string.             |
| `exclude`  | array of integer                                            | `[]`    | Ensure result set excludes specific IDs.              |
| `include`  | array of integer                                            | `[]`    | Limit result set to specific ids.                     |
| `order`    | one of `asc`, `desc`                                        | `desc`  | Order sort attribute ascending or descending.         |
| `orderby`  | one of `date`, `id`, `include`, `title`, `slug`, `modified` | `date`  | Sort collection by object attribute.                  |
| `code`     | string                                                      |         | Limit result set to resources with a specific code.   |

</details>

<details>

<summary>Description sent to AI tools</summary>

> Search and filter WooCommerce coupons with pagination. Use when you need a coupon ID, or to check which coupon codes exist.

</details>

## Update WooCommerce Coupon

`hostinger-ai/wc-coupons-update` · Changes the site · Safe to retry

Update a WooCommerce coupon; only the fields you pass change.

| Required parameter | Type    | Description                        |
| ------------------ | ------- | ---------------------------------- |
| `id`               | integer | Unique identifier for the resource |

<details>

<summary>Optional parameters (18)</summary>

| Parameter                     | Type                                            | Description                                                                                             |
| ----------------------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| `code`                        | string                                          | Coupon code.                                                                                            |
| `amount`                      | number or string                                | The amount of discount. Should always be numeric, even if setting a percentage.                         |
| `status`                      | string                                          | The status of the coupon. Should always be draft, published, or pending review                          |
| `discount_type`               | one of `percent`, `fixed_cart`, `fixed_product` | Determines the type of discount that will be applied.                                                   |
| `description`                 | string                                          | Coupon description.                                                                                     |
| `date_expires`                | null or string                                  | The date the coupon expires, in the site's timezone.                                                    |
| `individual_use`              | boolean                                         | If true, the coupon can only be used individually. Other applied coupons will be removed from the cart. |
| `product_ids`                 | array of integer                                | List of product IDs the coupon can be used on.                                                          |
| `excluded_product_ids`        | array of integer                                | List of product IDs the coupon cannot be used on.                                                       |
| `usage_limit`                 | integer                                         | How many times the coupon can be used in total.                                                         |
| `usage_limit_per_user`        | integer                                         | How many times the coupon can be used per customer.                                                     |
| `free_shipping`               | boolean                                         | If true and if the free shipping method requires a coupon, this coupon will enable free shipping.       |
| `product_categories`          | array of integer                                | List of category IDs the coupon applies to.                                                             |
| `excluded_product_categories` | array of integer                                | List of category IDs the coupon does not apply to.                                                      |
| `exclude_sale_items`          | boolean                                         | If true, this coupon will not be applied to items that have sale prices.                                |
| `minimum_amount`              | number or string                                | Minimum order amount that needs to be in the cart before coupon applies.                                |
| `maximum_amount`              | number or string                                | Maximum order amount allowed when using the coupon.                                                     |
| `email_restrictions`          | array of string                                 | List of email addresses that can use this coupon.                                                       |

</details>

<details>

<summary>Description sent to AI tools</summary>

> Update a WooCommerce coupon; only the fields you pass change. Use when asked to change a discount, expiry date or usage limit. Needs `id` from `hostinger-ai/wc-coupons-search`.

</details>

## Related

* [Abilities Reference](https://docs.hostinger.com/wordpress/hostinger-plugins/ai-plugin/abilities.md)
* [WordPress Site MCP Server](https://docs.hostinger.com/wordpress/hostinger-plugins/ai-plugin/mcp-server.md)
