Add Widgets

Billflow Shortcode

Step 1: Create a page to hold the Billflow widget.

You can create any page using your normal WordPress editor or page builder to do this.

Step 2: Use the shortcode to place a billing page widget

Shortcode

Editor Screenshot

[billflow billing_page_id="your_billing_page_id"]

Optional Step: override additional configurations via the Shortcode parameters.

The shortcode examples above default to use the settings that you set in the Billflow plugin settings page. However, some people have the use case to override the settings for individual pages, so we have the following setting available to override using the shortcodes.

Available shortcode parameters

billing_page_id

Example Value

"9c7ECmmhey47zZsmEtWC"

Value Type

String

Description

Your billing page id from dashboard.billflow.io

Example

[billflow billing_page_id="9c7ECmmhey47zZsmEtWC"]

gated

Example Value

"subscriber" OR "subscriber, customer"

Value Type

String OR Array of strings

Description

String for the allowed user role OR An array of allowed user roles

Example:

With a single allowed role

[billflow billing_page_id="9c7ECmmhey47zZsmEtWC" gated="subscriber"]

Example:

With a list of allowed

[billflow billing_page_id="9c7ECmmhey47zZsmEtWC" gated="basic_user, premium_user"]

logged_out_only

Value

true | a redirect url relative

Description

Makes the page a logged out only page, if a user is logged in, they will be sent to the home page if it is set to true. Or you can specify a redirect url.

Example: Redirect user to your home page

[billflow billing_page_id="9c7ECmmhey47zZsmEtWC" logged_out_only="true"]

Example: Redirect user to and custom page

[billflow billing_page_id="9c7ECmmhey47zZsmEtWC" logged_out_only="/my-portal-page"]

logged_in_only

Example Value

"true" OR "/a-relative-url-to-the-domain"

Value Type

String

Description

Makes the page a logged in only page, if a user is logged out, they will be sent to the login page or the redirect urlExample

Example:

Redirect user to standard login page

[billflow billing_page_id="9c7ECmmhey47zZsmEtWC" loggin_in_only="true"]

Example:

Redirect user to a custom page

[billflow billing_page_id="9c7ECmmhey47zZsmEtWC" loggin_in_only="/my-login-page"]

upgrade

Example Value

"/a-relative-url-to-your-domain"

Value Type

String

Description

If the current user does not have the role specified by the gated parameter, it will send the user to this upgrade page.Example

Example:

Redirect user to an upgrade page

[billflow billing_page_id="9c7ECmmhey47zZsmEtWC" gated="subscriber" upgrade="/upgrade-checkout-page"]

Next: Advanced Usage

Click next to see how you can add custom frontend logics

Last updated