# Apply a coupon code via URL in WooCommerce

When you send a coupon code in an email then a recipient has to:

1\. Select the code\
2\. Copy it to clipboard\
3\. Paste the code on the Cart page\
4\. Click on Apply coupon

You can make your customers life easier by sending a link that will automatically apply the coupon code.&#x20;

First, you need to install our free [Woo Coupon URL](https://wordpress.org/plugins/woo-coupon-url/) plugin:

![](/files/-La72h_i753GI8s0KrIQ)

Then, in your email template in Mailchimp you can construct the URL like this:

```
https://shop.example.com/?coupon=*|COUPON|*
```

{% hint style="info" %}
Replace shop.example.com with your e-commerce website domain.
{% endhint %}

![](/files/-La72F1Ref0ORCgf1b-N)

Mailchimp will show an error message that the URL is invalid. It's because \* and | are not acceptable in a web address. You can safely ignore it and click Insert. Mailchimp will replace the merge tag with an actual coupon code before sending the email, and the final URL will be valid.

![](/files/-La76DFr2exceE-iHGd8)


---

# 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.personaldiscount.io/woocommerce-and-magento/apply-a-coupon-code-via-url-in-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.
