WooCommerce variation link generator.

Build links to one exact WooCommerce product variation: a product page link that opens with the colour and size already selected, and an add-to-cart link that puts the variation in the cart and sends the shopper to the cart or straight to checkout. Useful for ads, emails, social posts and buy buttons on other pages. The links use WooCommerce's own URL formats, so they work without a plugin.

FREE TOOLVariation link generator

Pre-selected options and add-to-cart links for any variation.

Pre-select optionsAdd to cartStraight to checkoutNo plugin needed
Done-for-you WooCommerce work

Variation swatches, configurators, custom checkout flows and integrations by a WooCommerce developer. Free review, fixed quote, from $500.

See the service

The two links WooCommerce understands.

WooCommerce reads a product's options from the address. When a variable product page opens with attribute_pa_color=blue in the URL, the Color dropdown starts on Blue, and once every option is chosen the matching variation's price, stock and image show straight away. That's the first link this tool builds: the product page with your chosen options selected, so the shopper lands on exactly what you advertised and only has to press Add to cart.

The second link adds the variation to the cart directly. WooCommerce handles an add-to-cart parameter on any page of the store: give it a variation's ID and it finds the parent product, adds that variation in the quantity you set, and shows the page the link points to. Pointing the link at /checkout/ makes a one-click buy link; pointing it at /cart/ lets the shopper review first.

LinkExample
Options pre-selected?attribute_pa_color=blue
Add to cart/cart/?add-to-cart=1234
Straight to checkout/checkout/?add-to-cart=1234

Getting the attribute names right.

WooCommerce has two kinds of attributes, and they appear differently in the URL. Global attributes are the ones under Products, then Attributes, shared across products; they use attribute_pa_ followed by the attribute's slug, and the value is the term's slug, so Light Blue becomes light-blue. Custom attributes are typed into a single product's Attributes tab; they use attribute_ followed by the attribute name in lowercase with hyphens, and the value exactly as you typed it, capital letters included.

The tool converts names and terms the way WordPress does, including accents and spaces. If you changed a term's slug by hand, enter that slug instead of the name: you'll find it under Products, then Attributes, then Configure terms. The query parameter each row produces is shown under it, so you can compare it with the product page.

Where to find a variation ID.

Edit the product in WordPress, open Product data, then Variations. Each variation's row starts with its ID, such as #1234; that number goes into the tool. The add-to-cart link needs the variation's own ID, not the product's. If a variation uses Any Color or Any Size, include that option in the attributes above so the cart knows which one the shopper gets.

When a variation link won't work.

Links only add what the store would sell anyway: an out-of-stock variation, one that isn't published, or a quantity above the stock level shows WooCommerce's normal error. Stores that renamed their cart or checkout pages need that part of the address changed. Some caching setups cache pages with query strings; WooCommerce marks add-to-cart requests as not cacheable, but if a link misbehaves, exclude it from the cache. Themes and plugins that replace the variation dropdowns with swatches usually still read the same parameters, but test the link in a private window first.

If you want every variation to get its own shareable link automatically, updated as shoppers pick options, my free Variation URLs for WooCommerce plugin does that on the product page, with a copy-link button.

Custom WooCommerce work.

Variation swatches, landing pages for each variation, product configurators, custom checkout flows and integrations are the kind of WooCommerce development I do, with a fixed quote after a free review of what you need.

WooCommerce Variation Link Generator FAQs

How do I link to a specific variation in WooCommerce?+

Add the variation's attributes to the product URL, such as ?attribute_pa_color=blue&attribute_pa_size=large for global attributes. The product page then opens with those options selected. The tool above builds the link from the attribute names and options you enter.

How do I create an add-to-cart link for a WooCommerce variation?+

Use ?add-to-cart= followed by the variation's ID, and optionally &quantity=. For example, /cart/?add-to-cart=1234&quantity=2 adds two of variation 1234 and opens the cart. Use /checkout/ instead of /cart/ to send the shopper straight to checkout.

Why does my variation link open with no options selected?+

The attribute name or value doesn't match. Global attributes need attribute_pa_ and the term's slug; custom attributes need attribute_ and the value exactly as typed on the product. Check the slug under Products, then Attributes, then Configure terms.

Do I need a plugin for WooCommerce variation URLs?+

No. WooCommerce reads these parameters itself. A plugin such as Variation URLs for WooCommerce only helps if you want the address bar to update as shoppers pick options, so every variation has a link they can share.

Is the tool free?+

Yes, with no sign-up. The links are built in your browser and nothing is sent to your store.

Need more than a link?

Send me the site address and what you need. I’ll reply with a clear next step, usually the same day in US and UK hours.

Free review, fixed quote, from $500.

Your inquiry is emailed directly to Ali. No mailing lists, ever. See the privacy policy.