Shortcodes

When To Use Shortcodes

The best way to use LaunchFlows is with the built-in Gutenberg Block Editor. This is true even if you are using another page builder or theme for your main design.

In some cases, however, you may want/need to use Shortcodes for your sales funnel components. Or you may want to embed other components inside of an Elementor tab or toggle widget.

Checkout Shortcodes

Use On Any LaunchFlows Checkout Page

Account Fields

[lf-account]

Additional Fields

[lf-additional]

Always In Checkout (*only product is required)

[lf-always-in product="1234" icon="yes" title="yes" price="yes" shortdesc="yes"]

Billing Fields

[lf-billing]

Apply Tags With WPFusion (*separate tags with comma. Debug attr. shows message on front for admin.)

[lf-apply-tags tags="123,567" debug="yes"]

Autoclick Checkout

[lf-autoclick]

Bump or Variable Product Display
(*only product is required.) Click here to view optional styles.

[lf-bump product="1234" image="yes" title="yes" price="yes" style="p-round" shortdesc="yes"]

Donation & Pay Now

[lf-donate product="1234" field="Donate Big!" button="Do It Now!!"]

Checkout Button (Hide) Display
*Note-Add a new button with ID of #lf-checkout-button to replace this function

[lf-checkout-button]

First Product (in cart) Display

[lf-first-product-display]

Empty Cart Button Display

[lf-emptycart]

Empty Cart Via URL (add to end of LF-Direct Checkout link)

&clearcart

Hide Order Comments

[lf-hide-order-comments]

Login Display For WooCommerce

[lf-login]

Notices Display For WooCommerce
(*Be sure to position this in your layout where you would like page to scroll after any changes to the order review or in the event of errors)

[lf-notices]

Payment Fields

[lf-payment]

Redirect

[lf-redirect url=https://xyz.com sec=0]

Registration Form

[lf-registration]

Remove Product From Cart

[lf-remove-product id="1234"]

Remove Tags With WPFusion (*separate tags with comma)

[lf-remove-tags tags="123,567" debug="false"]

Review Order Fields (*all attributes are set to “yes” by default, so you can just add any you wish to change to “no”)

[lf-review remove="yes" image="yes" height="40px" width="40px" name="yes" quantity="yes"]

Save Stripe Credit Card Automatically

[lf-save-stripe-cc]

Save Square Credit Card Automatically

[lf-save-square-cc]

Scroll To Checkout

[lf-scroll-to-checkout style="button"]

Scripts For LaunchFlows
(*Use this on any page where you need LF style or scripts but it is disabled or not otherwise available)

[lf-scripts]

Shipping Fields

[lf-shipping]

Thank You Fields
(*only lf-thank-you is required to output all fields.)

[lf-thank-you details="no" imagesize="100" image="no" name="no" quantity="no" price="no" desc="no" shortdesc="no" total="no" dividers="no"]

Coupon Fields
(*only lf-wccoupon is required to output closed coupon.)

[lf-wccoupon closed="no"]

Upsell Product(*only product is required)

[lf-upsell product="1234" next="5678" accept="Yes, I Want It!" accept_tags="123,456" decline="No Thanks..." image="yes" title="yes" price="yes"]

Product Shortcodes

Use Only On Single Product Sale Or Checkout Pages
Product Direct To Checkout Link

[lf-product-link]

Product Breadcrumb

[lf-product-breadcrumb]

Product Add To Cart Button & Quantity

[lf-product-add-to-cart]

Product Description

[lf-product-description]

Product First Payment Date

[lf-product-firstpayment]

Product Images

[lf-product-images]

Product Meta (Category, Tags, etc.)

[lf-product-meta]

Product Price (Regular or Sale)

[lf-product-price]

Product Related Products

[lf-product-related]

Product Tabs (Reviews, Ratings, etc.)

[lf-product-tabs]

Product Name

[lf-product-name]

Product Breadcrumbs (Kadence Theme Only)

[lf-product-breadcrumbs]

Product Extras (Kadence Theme Only)

[lf-product-extras]

Product Payments Block (Kadence Theme Only)

[lf-product-payments]

Special Checkout Shortcodes

Use Only For Pages With Dynamic Content Blocks
LaunchFlows Checkout Form End

[lf-checkout-form-start]

LaunchFlows Checkout Form End

[lf-checkout-form-end]

Product Toggles

The LaunchFlows Product Toggles plugin enhances your WooCommerce store by allowing customers to add or remove products directly from any page using dynamic buttons, links, or checkboxes. This seamless experience keeps customers on the same page, improving user interaction and satisfaction.

Features

  • Dynamic Add/Remove Controls: The interface adapts based on the product’s cart status, displaying “Add to Cart” or “Remove from Cart” accordingly.
  • Multiple Display Styles: Choose from button, link, or checkbox styles to match your site’s design.
  • Hide Labels: Optionally hide labels for links, buttons, or checkboxes.
  • Compatibility: Supports both simple and variable products.
  • Customizable Labels: Define custom text for add and remove states.
  • Developer-Friendly: Easily extend functionality with unique CSS classes and custom styles.

Benefits

  • Enhanced User Experience: Customers can manage their cart without navigating away from the current page.
  • Flexible Placement: Insert toggle controls anywhere on your site using the shortcode.
  • Consistent Design: Customize the appearance to align with your site’s branding.

Usage

To implement the cart toggle functionality, use the shortcode with the following attributes:

  • id (required): The product ID or variation ID to toggle.
  • style (optional): Display style—"button" (default), "link", or "checkbox".
  • add_label (optional): Text for the “Add to Cart” state.
  • remove_label (optional): Text for the “Remove from Cart” state.
  • hide_label (optional): "yes" to hide labels or "no" (default) to display labels.
  • product_label (optional): Adds a descriptive label after product name or variation
  • clearcart (optional): "yes" to empty cart before new product is added

Examples

1. Default Button Style

Displays a button that toggles the product in the cart.

[lf_cart_toggle id="123"]

2. Custom Labels

Displays a button with custom labels for adding and removing the product.

[lf_cart_toggle id="123" add_label="Add Me" remove_label="Remove Me"]

3. Link Style

Outputs a text link that toggles the product in the cart.

[lf_cart_toggle id="123" style="link"]

4. Link Without Label

Outputs a plain link without any label.

[lf_cart_toggle id="123" style="link" hide_label="yes"]

5. Checkbox Style

Displays a checkbox that dynamically toggles the product in the cart.

[lf_cart_toggle id="123" style="checkbox" add_label="Check to Add" remove_label="Uncheck to Remove"]

6. Checkbox Without Label

Outputs a plain checkbox without any label.

[lf_cart_toggle id="123" style="checkbox" hide_label="yes"]

7. Checkbox With A Custom Label In Cart, Checkout, Order Detail

Outputs your custom label after product added to cart

[lf_cart_toggle id="123" style="checkbox" hide_label="yes" product_label="Good Choice!"]

Styling

Each control includes specific CSS classes for customization:

  • .lf-toggle-button-add: Applied when the product is not in the cart.
  • .lf-toggle-button-remove: Applied when the product is in the cart.
  • .lf-product-[product_id]: Unique identifier for each product instance.

Customization Example

To change the background color of the add and remove buttons, you can use the following CSS:

.lf-toggle-button-add {
    background-color: #008cba;
    color: #fff;
}

.lf-toggle-button-remove {
    background-color: #e74c3c;
    color: #fff;
}

Developer Notes

  • Extensibility: Utilize the unique CSS classes and WooCommerce hooks to add custom functionality when controls are activated.
  • Shortcode Functionality: The id attribute is mandatory to specify the product or variation ID. The plugin ensures clean URLs by removing query strings like add-to-cart and lf_remove_product.