[memb_keap_order_subscription]
Description
One button, no form to fill in. The member clicks, confirms, and Torii
creates the subscription in Keap against the plan you name with
plan_id. With autocharge on, the default, Keap invoices the
member's default card at the same time.
A member with no card on file never sees a dead button. They get an
"Add a card to subscribe" link pointed at card_url, so send them to a
page carrying
[memb_keap_add_creditcard];
with card_url unset, nothing renders for them at all. Turn
autocharge off and the subscription is created without a charge, for
plans you settle some other way.
The terms of the charge are yours to set. price overrides the plan's
catalog price, delay_days pushes the first bill back, and quantity,
promo_code, taxable, and affiliate_id round out the order.
A second click from a member who already has the subscription does not
create a duplicate. Torii detects it and sends the member to dupe_url
instead. Set allow_dupe="yes" when a second subscription is
legitimate, and dupe_tag_id tags the member whenever that duplicate
branch fires.
Each attempt ends somewhere useful: success lands on success_url with
success_tag_id applied, failure lands on failure_url with
failure_tag_id, and both default to the page the button is on. Render
the result with
[memb_keap_list_subscriptions].
Use has_any_tag and has_all_tags to gate who sees the button. Both
take Torii tag IDs, and the button simply does not render for members
who fail the check.
Shortcode Examples
The basic button:
[memb_keap_order_subscription plan_id="42"]
Cardless members get a path in, and success lands on your welcome page:
[memb_keap_order_subscription plan_id="42" card_url="/billing/add-card/" success_url="/welcome/"]
A launch offer with a custom price and a deferred first bill:
[memb_keap_order_subscription plan_id="42" price="29.00" delay_days="7" promo_code="LAUNCH"]
Only render for members holding one of two tags:
[memb_keap_order_subscription plan_id="42" has_any_tag="18,24"]
Shortcode Parameters
active
Whether Keap creates the subscription in an active state. no creates
it inactive for you to switch on later. Default: yes.
affiliate_id
Keap affiliate credited as the sale affiliate. Default: 0.
allow_dupe
Whether a member who already holds the subscription can start another
one. Default: no.
autocharge
Whether Keap charges the member's default card for the first bill. no
creates the subscription without a charge. Default: yes.
button_text
Label on the button. Default: Subscribe.
card_url
Link target shown instead of the button for members with no card on
file. Empty renders nothing for those members. Default: ''.
confirm
Whether the click asks the member to confirm before subscribing.
Default: yes.
debug
Show operator-facing notices for missing contact links, missing
plan_id, blocked tag guards, and unavailable card data. Super admins
only. Default: no.
delay_days
Days to wait before the first bill. 0 bills today. Default: 0.
dupe_tag_id
Torii tag ID applied when the member already holds the subscription.
Default: 0.
dupe_url
Where the member lands after a blocked duplicate attempt. Default: the page the button is on.
failure_tag_id
Torii tag ID applied when the subscription cannot be created. Default:
0.
failure_url
Where the member lands after a failed attempt. Default: the page the button is on.
has_all_tags
Comma-separated Torii tag IDs the member must hold for the button to
render. Default: ''.
has_any_tag
Comma-separated Torii tag IDs, any one of which lets the button render.
Default: ''.
plan_id
Keap subscription plan to subscribe the member to. Required; the shortcode renders nothing without it.
price
Price override in major units, such as 29.00. -1 uses the plan's
catalog price. Default: -1.
promo_code
Promo code applied to the order. Default: ''.
quantity
Quantity subscribed to. Values below 1 are raised to 1. Default: 1.
success_tag_id
Torii tag ID applied after the subscription is created. Default: 0.
success_url
Where the member lands after a successful subscribe. Default: the page the button is on.
taxable
Whether Keap computes tax on the order. Default: no.
Shortcode Attributes
| Attribute | Value |
|---|---|
| Conditional | No |
| Nestable | No |
| Accepts formatting | No |