reveal_quick_checkout

The reveal_quick_checkout shortcode is used when you want to let customers purchase a product on a page, but don't want the checkout page to be shown initially. This shortcode will display a button that reveals the checkout page after being clicked.

This shortcode accepts a number of attributes, including:

  • id: This is the product ID that the customer will be purchasing if they complete the checkout form. By default this is not set.
  • quantity: This is the quantity of the product that the customer will be purchasing. Default is 1.
  • variation_id: This is the ID of the variation that should be purchased for variable products. By default this is not set.
  • checkout_action: Defaults to 'lightbox'. You can use 'reveal' to have the checkout form be revealed on-page after clicking.
  • clear_cart: Whether the customer's cart should be cleared before adding this product to the cart. Default is true.
  • checkout_text: Text to display on the checkout. Default is "Buy Now".

Common examples of shortcode usage:

Display a button for a single product with product ID 123.

[reveal_quick_checkout id="123"]

Display a button for a single product with product ID 123 and variation ID 1.

[reveal_quick_checkout id="123" variation_id="1"]

Display a button for a purchasing two of a product with product ID 123.

[reveal_quick_checkout id="123" quantity="2"]

Display a button for purchasing a product with product ID 123 and text on the button that says "Purchase Now!".

[reveal_quick_checkout id="123" checkout_text="Purchase Now!"]

Display a button for purchasing a product with product ID 123 that is revealed on-page (not in a lightbox).

[reveal_quick_checkout id="123" checkout_action="reveal"]