Shortcodes Overview

Shortcodes allow you to display One Page Quick Checkout features anywhere WordPress shortcodes are supported. You can use them inside pages, posts, widgets, page builders, landing pages, custom templates, or block editor shortcode blocks.

The plugin includes three main shortcodes:

[plugincy_one_page_checkout]
[onepaquc_checkout]
[plugincy_cart]

Each shortcode is designed for a different purpose.


Available shortcodes

ShortcodePurposeBest used for
[plugincy_one_page_checkout]Displays a multi-product one-page checkout sectionLanding pages, bundles, product offers, pricing tables
[onepaquc_checkout]Displays an inline checkout form with optional product auto-addSingle product funnels, custom sales pages
[plugincy_cart]Displays a cart icon and cart drawerHeader, sidebar, custom templates, landing pages

Which shortcode should you use?

Use [plugincy_one_page_checkout] for multi-product checkout pages

Use this shortcode when you want customers to choose from multiple products and complete checkout on the same page.

Best for:

  • Product bundles
  • Landing pages
  • Special offers
  • Pricing tables
  • Product comparison pages
  • Campaign pages
  • Multi-product checkout pages

Example:

[plugincy_one_page_checkout product_ids="152,153,154" template="product-tabs"]

Use [onepaquc_checkout] for a single product checkout form

Use this shortcode when you want to display checkout for one specific product.

Best for:

  • Single product sales pages
  • Course checkout pages
  • Digital product checkout
  • One-product funnels
  • “Buy now” landing pages
  • Custom checkout pages built with a page builder

Example:

[onepaquc_checkout product_id="123" qty="1" clear_cart="yes"]

Use [plugincy_cart] for cart icon and drawer

Use this shortcode when you want to display the Plugincy cart icon or cart drawer in a custom location.

Best for:

  • Header templates
  • Sidebar areas
  • Custom page builder layouts
  • Floating/cart drawer access
  • Custom WooCommerce pages

Example:

[plugincy_cart drawer="right" cart_icon="cart"]

Where can you use shortcodes?

You can use shortcodes in many WordPress areas, including:

  • WordPress pages
  • WordPress posts
  • Shortcode block
  • Classic editor
  • Elementor shortcode widget
  • Gutenberg block editor
  • Sidebar widgets
  • Header/footer builders that support shortcodes
  • Custom page templates
  • Landing pages

Gutenberg/block editor

Add a Shortcode block, then paste the shortcode inside it.

Example:

[plugincy_one_page_checkout product_ids="152,153,154" template="product-table"]

Elementor

Use the Shortcode widget and paste the shortcode.

Example:

[onepaquc_checkout product_id="123" clear_cart="yes"]

Quick shortcode examples

Multi-product checkout with specific products

[plugincy_one_page_checkout product_ids="152,153,154"]

Use this to show selected products on a one-page checkout layout.


Multi-product checkout by category

[plugincy_one_page_checkout category="hoodies" template="product-table" show_images="yes"]

Use this to display products from a WooCommerce category.


Multi-product checkout with tabs layout

[plugincy_one_page_checkout product_ids="152,153,154" template="product-tabs"]

Use this when you want products displayed in a tabbed layout.


Single product checkout

[onepaquc_checkout product_id="123"]

Use this to display checkout for one product.


Single product checkout with quantity and clear cart

[onepaquc_checkout product_id="123" qty="2" clear_cart="yes"]

Use this when the page should clear the current cart and add a fixed product quantity.


Cart drawer on the right side

[plugincy_cart drawer="right" cart_icon="cart"]

Use this to display the cart icon and drawer.


Main differences between the shortcodes

Feature[plugincy_one_page_checkout][onepaquc_checkout][plugincy_cart]
Shows checkout formYesYesNo
Supports multiple productsYesNoNo
Supports product templates/layoutsYesNoNo
Can auto-add a productYesYesNo
Can clear cartYesYesNo
Shows cart drawerNoNoYes
Best for landing pagesYesYesSometimes
Best for header cartNoNoYes

Important notes before using shortcodes

Use valid WooCommerce product IDs

When using product_id or product_ids, make sure the product IDs exist and the products are published.

Example:

[onepaquc_checkout product_id="123"]

If product ID 123 does not exist, the checkout may not work correctly.


Use category slugs, not category names

When using category-based shortcode examples, use the WooCommerce product category slug.

Example:

[plugincy_one_page_checkout category="hoodies"]

If the category name is Hoodies, the slug may be:

hoodies

Variable products may require variation information

If you are using a variable product with [onepaquc_checkout], you may need to provide a valid variation ID.

Example:

[onepaquc_checkout product_id="123" variation_id="456"]

Avoid caching checkout shortcode pages

Pages that contain checkout/cart shortcodes should not be aggressively cached.

Exclude these pages from page cache:

  • Pages using [plugincy_one_page_checkout]
  • Pages using [onepaquc_checkout]
  • Cart page
  • Checkout page
  • My Account page

This helps prevent cart/session issues.


Do not place multiple checkout forms on the same page unless necessary

Using multiple checkout shortcodes on one page can confuse customers and may cause cart/session conflicts.

For most cases, use only one checkout shortcode per page.


Recommended use cases

Landing page with several products

Use:

[plugincy_one_page_checkout product_ids="152,153,154" template="product-tabs"]

Best for campaigns where users choose from multiple products.


One product sales funnel

Use:

[onepaquc_checkout product_id="123" clear_cart="yes"]

Best for pages focused on one product.


Header cart drawer

Use:

[plugincy_cart drawer="right" cart_icon="cart"]

Best for custom headers or templates.


Category-based checkout page

Use:

[plugincy_one_page_checkout category="hoodies" template="product-table"]

Best for showing a product group from one category.