To apply a WooCommerce coupon from a URL, install Coupons & Add to Cart by URL Links for WooCommerce, go to WPFactory > Coupons by URL (also at WooCommerce > Settings > URL Coupons) and keep URL Coupons enabled. Then share a link such as https://yourstore.com/?alg_apply_coupon=SAVE10 with any existing coupon code. This is free.
Can WooCommerce apply a coupon from a link without a plugin? #
WooCommerce core applies a coupon only when the customer types the code into the coupon field on the cart or checkout page. It has no built-in setting that applies a coupon from a link. You still create the coupon itself, with its amount, limits and expiry, under Marketing > Coupons; the plugin only applies it when the link is opened.
URL coupon general settings for WooCommerce #
The general options of Coupons & Add to Cart by URL Links for WooCommerce control how a coupon link is detected and applied, how it behaves for guests, and whether the coupon is delayed until a product is added. The settings below are all on the General sub-tab.

Go to WPFactory > Coupons by URL (also reachable at WooCommerce > Settings > URL Coupons) and stay on the General sub-tab.
URL Coupons Options #
- URL Coupons (enable plugin): the master switch that turns coupon links on. It is on by default.
General Options #
- URL coupons key: the query key used in your links. With the default key
alg_apply_coupon, a link looks likehttps://yourstore.com/?alg_apply_coupon=SAVE10. Change it to any word that is unique on your site. - Session > Force session start: starts a session when a coupon link is opened, so guests (not logged-in visitors) can have the coupon applied. On by default.
- Force session start earlier and everywhere: starts the session sooner, which helps on cached sites. Off by default.
- Add products to cart and Empty cart (Pro): for “Fixed product discount” coupons, add the coupon’s products to the cart, optionally clearing it first.
Delay Coupon Options #
- Delay coupon: hold the coupon until a product is added to the cart.
- Delay on non-empty cart: choose whether to still delay when the cart already has items. Options are Yes, No, and “No, if there is correct product already in the cart” for fixed product coupons.
- Check product: for fixed product coupons, only apply once a product the coupon is valid for is in the cart.
- Success and error notices: the messages shown when a delayed coupon is applied, is already applied, or does not exist. They accept the
%coupon_code%placeholder.
Options reference #
| Label | Option ID | Default | Free/Pro |
|---|---|---|---|
| URL Coupons (enable plugin) | alg_wc_url_coupons_enabled |
Yes | Free |
| URL coupons key | alg_wc_url_coupons_key |
alg_apply_coupon |
Free |
| Force session start | alg_wc_url_coupons_force_start_session |
Yes | Free |
| Force session start earlier and everywhere | alg_wc_url_coupons_force_start_session_earlier |
No | Free |
| Add products to cart | alg_wc_url_coupons_fixed_product_discount_add_products |
No | Pro |
| Empty cart | alg_wc_url_coupons_fixed_product_discount_add_products_emptycart |
No | Pro |
| Delay coupon | alg_wc_url_coupons_delay_coupon |
No | Free |
| Delay on non-empty cart | alg_wc_url_coupons_delay_coupon_non_empty_cart |
Yes | Free |
| Check product | alg_wc_url_coupons_delay_coupon_check_product |
No | Free |
For a full setting-by-setting list including the Notices and Advanced sub-tabs, see the URL Coupons settings and option IDs reference.
Troubleshooting #
- The coupon does not apply for guests. Keep Force session start on, and see the guide on making URL coupons work for guests and cached sites.
- Nothing happens when I open the link. Confirm the plugin is enabled and that the coupon code in the URL matches an active WooCommerce coupon.
Frequently asked questions #
Does the coupon link have to point to the home page? #
No. The coupon key is read on any page of your store, so you can add it to a product or category link, for example https://yourstore.com/product/example/?alg_apply_coupon=SAVE10.
Do the coupon’s usage restrictions still apply? #
Yes. The link applies a standard WooCommerce coupon through the normal cart process, so its expiry date, usage limits, minimum spend and product rules are still checked.
Can I use a shorter word instead of alg_apply_coupon? #
Yes. Change URL coupons key to any word that is not used elsewhere on your site, for example by another plugin, and use that word in your links.
Can I hide the coupon field once a coupon is applied by URL? #
Yes, for free. In Hide Coupon Options on the same sub-tab, hide the field on the cart and checkout pages and set Hide condition to Hide if coupon applied via URL; the default is Always hide. See hide and redirect coupons options.
What if the customer’s cart is empty when they open the link? #
Turn on Delay coupon so the coupon is held and applied once a product is added to the cart. See how to delay a URL coupon until a product is added.
Get more control #
Applying coupons by URL is free. Coupons & Add to Cart by URL Links for WooCommerce Pro adds add-to-cart coupons, redirects, and custom notices. See what Pro unlocks.
