---
title: "URL Coupons: Shortcodes Guide"
description: "The two WooCommerce URL coupon shortcodes: print notices on any page, and show text by language."
url: "https://wpfactory.com/docs/shortcodes-guide-coupon-url/"
updated: "2026-09-27"
category: Shortcodes
tags:
  - "Coupons & Add to Cart by URL for WooCommerce"
---

# URL Coupons: Shortcodes Guide

[Coupons & Add to Cart by URL Links for WooCommerce](https://wpfactory.com/item/url-coupons-woocommerce/) registers two shortcodes. One prints WooCommerce notices on pages that would not otherwise show them, and one shows or hides content by language for WPML and Polylang sites. This guide covers both, with the exact tags and attributes as they exist in the plugin.

These are the only two shortcodes the plugin provides. Applying a coupon itself is done through the coupon URL (for example `?alg_apply_coupon=CODE`), not through a shortcode.

---

### `[alg_wc_url_coupons_print_notices]`

**Availability:** Pro.

**What it does:** prints the queued WooCommerce notices at the point where you place it. This is useful when a coupon is applied on a page (such as a custom landing page) where WooCommerce notices are not normally displayed, so the "Coupon code applied successfully" style message would otherwise be missed.

**Parameters:** none.

**Example:**

```
[alg_wc_url_coupons_print_notices]
```

**Note:** this shortcode prints all available WooCommerce notices on that request, not only coupon notices from this plugin.

---

### `[alg_wc_url_coupons_translate]`

**Availability:** Free.

**What it does:** shows or hides content depending on the active site language, for stores using WPML or Polylang. Use it to write coupon messages that differ per language.

**Attributes:**

| Attribute | What it does |
| --- | --- |
| `lang` | Comma-separated language codes to match, for example `EN,DE`. |
| `not_lang` | Comma-separated language codes to exclude. |
| `lang_text` | Text shown to the `lang` languages (attribute form). |
| `not_lang_text` | Fallback text for all other languages (attribute form). |

**Example, attribute form:**

```
[alg_wc_url_coupons_translate lang="EN,DE" lang_text="Discount applied!" not_lang_text="Reduction appliquee !"]
```

**Example, wrapping form:**

```
[alg_wc_url_coupons_translate lang="EN,DE"]Discount applied![/alg_wc_url_coupons_translate]
[alg_wc_url_coupons_translate not_lang="EN,DE"]Reduction appliquee ![/alg_wc_url_coupons_translate]
```

Language codes are matched case-insensitively. For a full walkthrough, see the guide on translating URL coupon text with WPML and Polylang.

---

### Get more from URL Coupons

The `[alg_wc_url_coupons_translate]` shortcode is free. [Coupons & Add to Cart by URL Links for WooCommerce](https://wpfactory.com/item/url-coupons-woocommerce/) Pro adds custom per-coupon notices, per-coupon redirects, add-to-cart coupons, and the `[alg_wc_url_coupons_print_notices]` shortcode. [See what Pro unlocks](https://wpfactory.com/item/url-coupons-woocommerce/).

Related articles

- [Make URL Coupons Work for Guests and Cached Sites](https://wpfactory.com/docs/woocommerce-url-coupons-guests-caching/)
- [How to Translate URL Coupon Text with WPML and Polylang](https://wpfactory.com/docs/woocommerce-translate-url-coupon-notices/)
- [How to Set a Redirect URL Per Coupon](https://wpfactory.com/docs/woocommerce-redirect-url-per-coupon/)
- [How to Delay a URL Coupon Until a Product Is Added](https://wpfactory.com/docs/woocommerce-delay-url-coupon/)
- [How to Add Coupon Products to the Cart by URL](https://wpfactory.com/docs/woocommerce-add-coupon-products-to-cart-url/)

 

[![Coupons & Add to Cart by URL for WooCommerce](https://wpfactory.com/wp-content/uploads/Coupons-Add-to-Cart-by-URL-Links-for-WooCommerce.webp)](https://wpfactory.com/item/url-coupons-woocommerce/)
