Skip to main content

mbr_quick_checkout

Usage

This shortcode adds one or more products to a WooCommerce shopping cart and sends the user directly to the checkout page.

Parameters

ParametersDescription
p{product_id}=quantityProduct IDs to add to the cart. Product ID’s are defined by using the letter 'p' followed by the WooCommerce product ID. If provided without specifying a quantity, quantity will default to 1. If a product ID refers to a nonexistent product, it will be ignored.
Defaults: none.
Required: yes.
autorunIf set to yes the shortcode will execute without waiting for user input. Otherwise it will generate a form and a submit button or link_style and wait for user input. If set to yes the following parameters will be ignored; link_text, link_style, button_text, button_image, button_style.
Permissible Values: yes
Defaults: none.
Required: no.
link_textThe text to display for the link.
Defaults: Add to cart
Required: no.
link_styleThe CSS style to apply for the link.
Defaults: none.
Required: no.
button_textThe text to display on the button.
Defaults: Add to cart
Required: no.
button_imageThe URL of the image to use for the button.
Defaults: none.
Required: no.
button_styleThe CSS style to apply for the button.
Defaults: none.
Required: no.
Important

This shortcode is only processed when the ActiveMember360 WooCommerce Extension is enabled as detailed within ActiveMember360 WooCommerce Extension Activation.

The shortcode checks the ActiveMember360 settings for each product and ensures that only those products that a user or visitor is allowed to purchase are processed. If none of the given products are allowed, the shortcode does not execute.

WooCommerce product variations are not supported.

Validity

This shortcode is evaluated for any type of visitor.

Conditional Branching

This shortcode does NOT support conditional branching with [ELSE_quick_checkout].

Nesting

Shortcode nesting is NOT supported.

Examples

Adds the WooCommerce product ID 345 to the cart and redirects to the checkout when the link labelled 'Add to cart' is clicked:

[mbr_quick_checkout p345]

API

Note

There is currently no ActiveMember360 API function equivalent for this shortcode.