Skip to content
Gaurav TiwariDocs

Share Buy Links and a Buy Now Button

Updated October 17, 2026

You send a product link in an email or a sales page, and the buyer lands on the product page. Then they have to pick options, add to cart, find the cart and click through to checkout. Every one of those steps loses people, and there’s no clean way to hand someone a discounted bundle in one click.

Buy Links turns any page URL into a direct checkout link. The link fills the cart with the products you choose, applies a coupon if you want, and opens checkout. Links can be signed so nobody can change the quantity or the coupon. The module also adds an optional Buy now button beside Add to cart.

A buy link is any page on your site with ?stackless-buy= and one or more items:

https://example.com/?stackless-buy=123
https://example.com/?stackless-buy=123:2
https://example.com/?stackless-buy=456:789:1
https://example.com/?stackless-buy=123,456:789:2&coupon=SPRING

Each item follows these rules:

  • product adds one of that product.
  • product:second adds a variation when the product is variable. Otherwise the second number is a quantity.
  • product:variation:quantity gives you full control.
  • Commas separate items. A link can hold up to 20 items, and quantities are capped at 9999.

You can add these parameters:

  • coupon=CODE applies a coupon. Separate several codes with commas, up to 5.
  • clear=1 empties the cart first. clear=0 keeps it.
  • to=checkout or to=cart picks where the customer lands.
  • utm_ parameters are carried over to the checkout or cart URL.
  • attribute_ parameters fill variation attributes that are set to “Any”.

Subscription products work like any other product, because a link adds normal cart items. Grouped and external products can’t be bought through a link. A variable product needs a specific variation.

Switch on Buy Links from Stackless > Dashboard, then go to Stackless > Settings and choose Buy Links under Sales & invoices.

  • Empty the cart first: on by default. A link can override it with clear=0 or clear=1.
  • Send customers to: Checkout (default) or Cart.
  • Signed links: Optional (default) or Required. Optional means unsigned links work and signed links are checked. Required means only signed links work, so nobody can change the quantity or coupon.
  • Reset signing key: makes a new key when you save. Every signed link made so far stops working.

Every product edit screen has a Buy link box in the sidebar.

  1. For a variable product, choose a Variation.
  2. Set the Quantity.
  3. Optionally pick other products under Also add, and enter a Coupon.
  4. Set Existing cart (Store default, Empty it first, Keep it) and Open (Store default, Checkout, Cart).
  5. Leave Sign the link so it cannot be edited ticked, and pick an Expires date if you want one.
  6. Click Make link, then Copy.

Variable, grouped and external products picked under Also add are left out, and the box tells you how many were skipped. Pick a specific variation instead. Publish the product before you share its link, because links to drafts only work for store managers.

How Signing Works

A signed link carries a sig parameter. The signature covers the products, quantities, coupons, cart option, destination and expiry date. If someone edits any of those, the link is rejected.

  • Signing uses a secret key stored on your site, created when the module is installed.
  • An expiry date applies only to signed links. The link stops working after 23:59:59 on that date, in your site’s timezone.
  • When signing is Optional, a link with a sig is still checked. A bad signature is rejected, not ignored.

A failed link sends the customer to the cart with a notice. It says the link is not valid (bad or missing signature), has expired, has no products, or that a product isn’t available or needs its options chosen.

If some items in a link can’t be read, the rest are added and the customer sees a notice that some were skipped. Coupons are applied only when at least one product was added.

Add a Buy Now Button

The Buy now button section adds a second button beside Add to cart that goes straight to checkout.

  • Show Buy now: on product pages. Off by default.
  • In shop grids: also on simple products in shop and category grids. Off by default.
  • Button text: “Buy now” by default, up to 40 characters.
  • Buy only this product: on by default. Buy now checks out just this product and leaves nothing else in the cart.

Each product can override the store setting with the Buy now button field in its Buy link box: Store default, Show on this product, or Hide on this product.

On product pages, the button shows for simple and variable products that are purchasable and in stock. On a variable product it stays disabled until the customer chooses a variation.

Limits

  • The Buy now button needs the classic add-to-cart form. WooCommerce’s “Add to Cart with Options” block doesn’t show it.
  • A link adds at most 20 items. Extra items are ignored.
  • A sold-individually product is always added with a quantity of 1.
  • Developers can change the final destination with the stackless_buy_links_redirect filter, and react to a processed link with the stackless_buy_links_processed action.
Share

Was this helpful?

Still stuck? Open a support ticket