[purchase_link] Shortcode

[purchase_link] Shortcode

The [purchase_link] shortcode is used to display a purchase button for any download anywhere your site.

A default [purchase_link] is available for every Download in the Download’s settings, under Purchase Shortcode.

The shortcode accepts a few optional parameters:

  • id – the ID number of the download for the button
  • SKU – the assigned SKU value for the download (if enabled)
  • price – whether to show the product price or not. 1 to show it, 0 to hide it.
  • text – the text displayed on the button
  • style – the style of the purchase link, either “button” or “text”
  • colour- the colour of the button (when using the “button” style”:
    • grey
    • blue
    • green
    • dark grey
    • yellow
  • class – one or more custom CSS classes you want to apply to the button
  • price_id – the variable price ID to create a purchase button


[purchase_link id="94" text="Add to Cart" style="button"]

A purchase button for a specific price option:

[purchase_link id="94" text="Add to Cart" style="button" price_id="2"]

Direct Purchase Example

[purchase_link id="94" text="Buy Now" style="button" direct="true"]

Powered by BetterDocs

Leave a Reply

Your email address will not be published. Required fields are marked *

EDD Sell Services