How to Share a WooCommerce Discount Link That Auto-Applies the Code
WooCommerce Tips · Email & Promotion
How to Share a WooCommerce Discount Link That Auto-Applies the Code
Asking subscribers to remember and type a code is friction that quietly kills conversions. The fix is a URL that lands customers on the cart with the code already applied — no typing required. This guide covers how that works in WooCommerce, where native options stop short, and how to extend auto-apply to every discount type including BOGO, tiered, and bundle deals.
You write an email, set up a promotion, and include a discount code in the subject line. Some customers find it. Most forget it by the time they reach checkout — or they close the tab and never come back. The code is the friction point. The fewer steps between “I want to take advantage of this offer” and “the discount is in my cart,” the higher the conversion rate.
A WooCommerce auto-apply coupon link eliminates the typing step entirely. The customer clicks a link in your email, SMS, or social post, lands on the cart page, and the code is already applied. This guide explains how that works, where the native WooCommerce approach runs out of road, and what to reach for when you need auto-apply on a BOGO, tiered, or bundle campaign.
Why a clickable link beats a typed code
The problem with shared coupon codes is not just that customers forget them. It is that every step between “I saw the offer” and “the offer is applied” is an opportunity to drop off. A customer who forgets to enter the code at checkout is not going to abandon their cart and go back to find the email — they will complete the purchase without the discount, or not complete it at all.
An auto-apply link removes that whole question. The customer does not need to remember the code, find the coupon field, or know that checkout has a place to enter it. They click, they arrive on the cart, the discount is visible. That is the entire experience.
This matters even more for single-use or per-customer codes sent in transactional emails. A customer who receives a personal win-back code and then cannot figure out how to apply it is a customer you have already paid to re-engage and then lost again at the last step. Pairing unique codes with auto-apply links solves both problems at once: the code is personal, and the redemption experience is effortless.
Auto-apply links also help with social proof
When someone shares your discount link publicly — in a group, on a review site, on social media — the code is visible in the URL. That is fine for campaigns where broad sharing is the goal. If you want the link to be non-guessable and single-use, use a bulk unique code per recipient and generate one link per person. Both approaches are covered below.
What WooCommerce gives you natively
WooCommerce does not include a built-in URL-based coupon auto-apply feature. There is no native ?coupon_code= query parameter that comes out of the box with WordPress or WooCommerce core. According to WooCommerce’s own documentation, there is no built-in functionality to automatically apply coupon codes via a URL.
Applying coupons via URL in WooCommerce requires either a third-party plugin or a custom integration. WooCommerce does offer a paid “URL Coupons” extension through the WooCommerce marketplace, but it works differently from a simple query string: it uses custom URL slugs rather than a ?param=value format, and it only supports WooCommerce-native coupon objects, not campaign-level discounts.
This matters because it means a standard WooCommerce coupon and a campaign-managed BOGO or tiered discount are fundamentally different things. Understanding that split is what WooCommerce coupons versus campaign discounts covers in detail. The short version: WooCommerce coupons are applied at checkout as coupon objects; campaign discounts like BOGO or tiered pricing are applied at the product-price level. A native coupon URL cannot trigger a BOGO discount because there is no coupon object behind it to link to.
The ?wsscd_code= parameter: how it works
Smart Cycle Discounts adds a URL parameter, ?wsscd_code=YOURCODE, that auto-applies a campaign code when a customer lands on any page of your store. The parameter was introduced in version 2.1.0 as part of the promo code campaigns feature.
The mechanism is straightforward. When a customer visits a URL containing ?wsscd_code=SAVE20, the plugin reads the parameter on template_redirect, sanitizes the code, and calls WooCommerce’s own cart API to apply it. After the code is applied, the plugin redirects to the same URL with the parameter stripped from the address bar — so the customer does not see a cluttered URL and cannot accidentally reload the page and re-trigger the application. The code appears in the cart just like a manually-entered coupon: as a “Coupon CODE: −$X.XX” line in the totals.
If the code is already applied (say, the customer clicks the link twice), the plugin detects this and does not re-apply it. If the cart is empty, the code is still applied and will show at checkout. If the code is invalid or expired, WooCommerce’s own coupon validation returns an error message through the normal notice system.
The link can point to any page
You do not have to link directly to the cart. The ?wsscd_code= parameter works on any page — a product page, a category page, your homepage. The code is applied to the session on arrival, so by the time the customer reaches checkout the discount is already there. Linking to a relevant product page can work better than linking to the cart for promotional emails where you want the customer to see the offer in context first.
Which discount types it covers
The ?wsscd_code= parameter works with every campaign type that Smart Cycle Discounts supports as a code-gated campaign. That covers all of the following, on both the free and Pro plans:
| Discount type | Free / Pro | Auto-apply via URL |
|---|---|---|
| Percentage off | Free | ✓ Included |
| Fixed amount off | Free | ✓ Included |
| BOGO (Buy One Get One) | Free | ✓ Included |
| Tiered quantity discounts | Pro | ✓ Included |
| Spend threshold discounts | Pro | ✓ Included |
| Bundle discounts | Pro | ✓ Included |
This is where the gap with native WooCommerce coupon URL approaches is most significant. A BOGO or tiered campaign in Smart Cycle Discounts is managed at the campaign level, not as a WooCommerce coupon object. The ?wsscd_code= parameter works because it routes through Smart Cycle Discounts’ own coupon bridge, which knows how to apply the full campaign including its discount logic. A native WooCommerce coupon URL cannot trigger a campaign that has no WooCommerce coupon object behind it.
The practical consequence: if you want to send an email with a “Buy 2 get 1 free” link that auto-applies when clicked, ?wsscd_code=BOGO20 does that. There is no equivalent native approach for complex discount types.
The Copy share link button (2.1.1)
Version 2.1.1 of Smart Cycle Discounts added a per-campaign codes page reachable via the “View codes” link on any code-required campaign in the Campaigns list. That page shows every code associated with the campaign, its usage count, and (on Pro) an export option.
Next to each code, there is a read-only text field containing the pre-built ?wsscd_code=YOURCODE URL pointing at your cart page, and a Copy button. Clicking Copy puts the full URL on your clipboard. That is the link you paste into your email template, SMS workflow, or social post.
This removes the manual step of constructing the URL yourself. Previously, you would need to know your cart URL, append the query string, and make sure the code value was correct. The “View codes” page does that for you and makes the result one-click to copy.
What this looks like in practice
You create a code-required BOGO campaign. You go to the Campaigns list, click “View codes” on that campaign, and see your single shared code (or your list of bulk unique codes on Pro). Next to each code is its pre-built share link. You click Copy, paste it into your email platform, and send. Customers who click land on the cart with the BOGO already applied. No instructions needed, no code field to find.
How to build your share URL
Whether you use the Copy button or build the URL manually, the structure is the same:
https://yourstore.com/cart/?wsscd_code=YOURCODE
Replace yourstore.com with your actual domain and YOURCODE with the code value from your campaign. The URL is case-insensitive for the code value — the plugin normalizes codes to uppercase before lookup, so SAVE20, save20, and Save20 all work.
You can also point the link at a specific product page, a category page, or any other URL on your store. The cart does not need to be the landing page:
https://yourstore.com/product/running-shoes/?wsscd_code=SUMMER25
The code is applied to the session when the page loads. By the time the customer adds the product and proceeds to checkout, the discount is already in place.
-
Create a code-required campaign in Smart Cycle Discounts
In the campaign wizard, go to the Discount step and choose “Requires a code” as the delivery method. Enter the code you want to use (e.g.
BOGO25). On Pro, you can generate bulk unique codes here instead of using a single shared one. -
Open “View codes” on the Campaigns list
Once the campaign is saved, find it in the Campaigns list. You will see a tag icon on code-required campaigns (added in 2.1.1). Hover over the campaign row and click “View codes” to open the per-campaign codes page.
-
Click Copy next to your code
Each code row shows a pre-built share URL pointing at your cart, and a Copy button. Click Copy to put the full
?wsscd_code=URL on your clipboard. If you have bulk unique codes, there is a copy button next to each one. -
Paste into your email, SMS, or social post
The URL is ready to use as-is. In most email platforms, you would use it as the href behind a button or text link. Customers who click will land on the cart with the code already applied.
Where to use auto-apply links
Auto-apply links are most valuable anywhere you already have the customer’s attention and want to minimize the steps between interest and purchase.
Email campaigns
The highest-impact use. A “20% off this weekend” email where the button says “Claim your discount” and clicking lands the customer on the cart with the code applied is materially different from an email that says “Use code SAVE20 at checkout.” The second version requires the customer to remember the code, navigate to your store, add items, find the coupon field, and type correctly. The first version removes all of that.
For win-back campaigns, the combination of a personalized unique code and an auto-apply link is particularly effective. If you are using single-use codes for win-back emails, the code is already personal and locked to that customer. Pairing it with a link that applies it automatically removes any remaining reason not to act.
SMS and push notifications
Characters are limited. Saying “tap to get 15% off” with a direct link is cleaner than “use code X at checkout.” The link is short enough to work in SMS, and customers who tap arrive at the cart with the discount already there.
Social media posts and influencer campaigns
A link in an Instagram bio, a Facebook post, or a creator’s video description can include the code baked in. Followers who click get the discount automatically without needing to copy and paste a code from the caption. For influencer campaigns, each creator can have their own code (from a bulk-generated set on Pro) and their own trackable link.
Transactional emails and order confirmations
An order confirmation that includes “Here’s 10% off your next order” with a link that auto-applies the code is a clean retention touchpoint. The customer is already in a positive frame of mind after completing a purchase, and the friction to act on the offer is near zero. This pairs well with scheduled campaigns: you set the campaign in advance, generate the link once, and use it consistently across your post-purchase flows.
QR codes at physical touchpoints
A URL with ?wsscd_code= encodes cleanly as a QR code. Print it on a packaging insert, a shelf card, or a receipt. Customers who scan arrive on your store with the promotion already applied.
Edge cases and gotchas
Auto-apply links mostly just work, but there are a few situations worth knowing about before you build campaigns around them.
The campaign must be active when the link is clicked
The code only works while the underlying campaign is running. If a customer saves the link and clicks it after the campaign ends, the code will fail to apply and WooCommerce will show a standard “coupon expired” or “coupon not found” notice. This is expected behaviour, but it means links sent in scheduled emails need to match the campaign’s actual active window. If you send the email a day before the campaign starts, customers who click immediately will get an error. Schedule sends to align with the campaign’s activation time.
Single-use codes can only be claimed once
Pro campaigns with single-use codes will decline the code after the first redemption. If a customer clicks the link twice or shares it with someone else, the second attempt will be declined. This is the expected behaviour for per-customer codes — but if you are using a single shared code with a usage limit, be aware that the limit counts across all redemptions, not just first-time visitors.
Shared codes can end up on deal aggregator sites
Any link containing a shared code is effectively public once you send it to a list. Coupon aggregator sites and browser extensions scrape links from emails, and a shared code in a clickable URL is just as easy to extract as one written in the email body. If you want the discount to be exclusive to specific recipients, use bulk unique codes (Pro) — each recipient gets their own code, and the link for each code is one-time-usable. This is the same principle discussed in the post on sending single-use codes to customers.
The code parameter strips from the URL after application
After the plugin applies the code, it redirects to the same page with ?wsscd_code= removed from the URL. This is intentional — it prevents the code from being applied again on refresh and keeps the address bar clean. From the customer’s perspective, the URL looks normal and the discount is visible in the cart. If you are testing the link, you will see the redirect happen in the browser.
Auto-apply campaigns vs. code-required campaigns are different modes
Smart Cycle Discounts campaigns have two delivery modes: auto-apply (the discount fires for every qualifying customer without any code) and code-required (the discount only fires when a valid code is present). The ?wsscd_code= link is for code-required campaigns. Auto-apply campaigns do not use codes at all — the discount is already in place for any customer who qualifies. If you want to understand when to use each mode and what the tradeoffs are, the companion post on WooCommerce coupons versus campaign discounts covers the decision in detail.
Codes that fail validation show WooCommerce’s standard notices
If the code is wrong, expired, or already used, WooCommerce’s own notice system displays the error. The customer sees the same error message they would see if they had typed the code manually. The plugin does not suppress these notices — they are the correct behaviour. If customers are reporting errors when clicking your link, the most likely causes are: the campaign has ended, the code has reached its usage limit, or there is a conflict with another active discount. The WooCommerce coupon not working guide covers the common causes and how to diagnose them.
What to take away from this
- WooCommerce does not have a built-in URL-based coupon auto-apply. Auto-applying a code via a URL requires a plugin or paid extension. Native WooCommerce coupons also cannot trigger BOGO, tiered, or bundle campaign logic.
- Smart Cycle Discounts’
?wsscd_code=YOURCODEparameter was introduced in version 2.1.0 and works on every campaign type — percentage, fixed, BOGO, tiered (Pro), spend threshold (Pro), and bundle (Pro). - The link works on any page, not just the cart. The code is applied to the session on
template_redirectand the parameter is stripped from the URL after application so the address bar stays clean. - Version 2.1.1 added a “Copy share link” button on the per-campaign codes page. Each code row shows its pre-built share URL; clicking Copy puts it on the clipboard immediately. No manual URL construction needed.
- For shared codes, be aware they can spread beyond your intended audience. If exclusivity matters, use bulk unique codes (Pro) and send one link per recipient.
- The campaign must be active when the link is clicked. Customers who save the link and click after the campaign ends will see a standard WooCommerce coupon error. Align email send times with your campaign schedule.
Frequently asked questions
Does the ?wsscd_code= parameter work on the checkout page, or only the cart?
It works on any page. The code is applied to the WooCommerce cart session when the page loads, regardless of which page you link to. You can link to a product page, a category page, your homepage, or the cart — the discount will be present by the time the customer reaches checkout. Linking to a product page can make sense for promotional emails where you want the customer to see the product in context before adding to cart.
Can I use this with BOGO campaigns on the free plan?
Yes. BOGO campaigns are included in the free plan, and code-required BOGO campaigns support URL auto-apply. Create a campaign with BOGO as the discount type, choose “Requires a code” in the delivery settings, enter a code value, and the ?wsscd_code= link will work for that campaign once it is active.
What happens if the customer already has the code applied and clicks the link again?
Nothing. The plugin checks whether the code is already in the cart’s applied coupons before calling WooCommerce’s apply method. If the code is already there, the request is skipped. The customer will not see an error and will not get a duplicate application.
Can I change the URL parameter name from ?wsscd_code to something else?
Yes. The parameter name is filterable via the wsscd_url_coupon_param_name WordPress filter. This is useful if you want a shorter or branded URL parameter. The same filter is applied consistently across the URL-apply logic and the share-link builder, so changing it in one place changes it everywhere.
Is URL auto-apply only for code-required campaigns, or can it also work with auto-apply campaigns?
It is for code-required campaigns only. Auto-apply campaigns do not use codes — the discount fires automatically for any customer who qualifies based on the campaign’s settings. There is no code to pass in the URL for an auto-apply campaign, and you would not need one: the discount is already there for qualifying customers. If you want to drive traffic to a campaign that applies automatically, link to the relevant product or category page with a clear promotional message but without a code parameter.
Can I use the same link in multiple emails sent at different times?
Yes, as long as the campaign is active for the entire window you plan to send. If the campaign has a fixed end date, make sure your last send goes out while the campaign is still live. For ongoing or recurring promotions — a weekly flash sale, for example — the same link works on every send because the campaign reactivates on its scheduled cycle.