Shortcode Troubleshooting and Best Practices

Use this guide when a shortcode does not display correctly, checkout does not load, products are missing, or the cart drawer does not work as expected.

This article covers common issues for these shortcodes:

[plugincy_one_page_checkout]
[onepaquc_checkout]
[plugincy_cart]

Quick checklist

Before checking individual issues, confirm these basics first:

CheckWhat to confirm
Plugin statusOne Page Quick Checkout for WooCommerce is active
WooCommerce statusWooCommerce is installed and active
Product statusProducts are published and purchasable
Product stockProducts are in stock or backorders are allowed
Shortcode spellingShortcode name and attributes are typed correctly
Page cacheCheckout/cart shortcode pages are excluded from cache
JavaScriptNo major JavaScript errors on the page
LicensePro-only shortcode features have an active license

Shortcode not rendering

If the shortcode appears as plain text on the page, WordPress is not processing it.

Common causes

  • Shortcode is typed incorrectly.
  • The shortcode was added inside a code block instead of a shortcode block.
  • The theme/page builder area does not process shortcodes.
  • The plugin is inactive.
  • WooCommerce is inactive.
  • The shortcode was copied with invalid formatting.

How to fix

Use the correct shortcode format:

[plugincy_one_page_checkout]
[onepaquc_checkout]
[plugincy_cart]

In the block editor

Use a Shortcode block, not a Code block or Paragraph block.

In Elementor

Use the Shortcode widget.

In custom PHP templates

Use:

<?php echo do_shortcode('[plugincy_one_page_checkout product_ids="152,153,154"]'); ?>

Checkout form is not showing

This can happen with [plugincy_one_page_checkout] or [onepaquc_checkout].

Possible causes

  • Cart is empty.
  • Product was not added automatically.
  • Product ID is missing or incorrect.
  • Product is out of stock.
  • Product is not purchasable.
  • WooCommerce checkout page is not configured.
  • Checkout shortcode page is cached.
  • Another plugin is changing checkout behavior.

How to fix

For single product checkout, use a valid product ID:

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

For a focused single-product page, use:

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

For multi-product checkout, define product IDs:

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

Also confirm:

  • Product is published.
  • Product is in stock.
  • Product price is set.
  • Product can be purchased normally from WooCommerce.
  • Checkout page works without the shortcode.

Product not added to cart

If the product appears but is not added to the cart, check the product and shortcode settings.

Common causes

  • Invalid product ID
  • Product is out of stock
  • Product is not purchasable
  • Variable product requires a variation
  • Cart is blocked by another plugin
  • AJAX/cart scripts are not loading
  • Cache conflict

Fix for simple products

Use:

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

Fix for variable products

For a fixed variation, include both product ID and variation ID:

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

Make sure the variation belongs to the selected product and is in stock.


Variable product is not working

Variable products need valid variation data.

Check these items

  • Parent product ID is correct.
  • Variation ID is correct.
  • Variation belongs to the parent product.
  • Variation is enabled.
  • Variation is in stock.
  • Required attributes are set.
  • Product variations are configured correctly in WooCommerce.

Example

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

If customers should choose the variation

Use the multi-product checkout shortcode with a product template that supports variation selection:

[plugincy_one_page_checkout product_ids="123" template="product-table"]

Then test the full variation selection flow before publishing.


Products are not showing in [plugincy_one_page_checkout]

If no products appear in the multi-product checkout section, check the product source.

Product IDs

Make sure IDs are comma-separated and valid:

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

Category

Use the product category slug, not the category name:

[plugincy_one_page_checkout category="hoodies"]

Tags

Use product tag slugs:

[plugincy_one_page_checkout tags="new-arrival,bestseller"]

Attributes

Use the correct attribute taxonomy and term slugs:

[plugincy_one_page_checkout attribute="pa_color" terms="black,blue"]

Also check

  • Products are published.
  • Products are in stock.
  • Products are visible in catalog/search if required.
  • Products are assigned to the selected category/tag/attribute.
  • Product visibility is not hidden.
  • Shortcode syntax is correct.

Cart drawer does not open

This affects:

[plugincy_cart]

Common causes

  • Frontend JavaScript is not loading.
  • Theme or page builder has a script conflict.
  • Cache/minification delayed required scripts.
  • Drawer position is invalid.
  • Cart drawer is hidden behind another element.
  • WooCommerce cart/session scripts are not working.

How to fix

Start with a simple shortcode:

[plugincy_cart]

Then test:

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

If the drawer opens with the simple shortcode but not with custom attributes, review the custom values.


Cart count does not update

If the cart icon appears but the count does not update, WooCommerce cart fragments or plugin AJAX updates may not be working.

Check these items

  • AJAX Add to Cart is enabled, if used.
  • WooCommerce cart fragments are not disabled by optimization plugins.
  • Cart/session cookies are not blocked.
  • Cache plugin is not caching dynamic cart data.
  • JavaScript errors are not stopping cart updates.
  • CDN is not serving stale cart content.

Recommended cache exclusions

Exclude:

Cart
Checkout
My Account
Pages using [plugincy_cart]
Pages using [onepaquc_checkout]
Pages using [plugincy_one_page_checkout]

Styling looks broken

Shortcode output may look different depending on your theme, page builder, and global styles.

Common causes

  • Theme CSS overrides plugin styles.
  • Page builder spacing conflicts with shortcode layout.
  • Custom CSS is affecting buttons, tables, or forms.
  • Cache/minified CSS is outdated.
  • Checkout form inherits unexpected theme styles.

How to fix

Try:

  • Clear all caches.
  • Temporarily disable CSS minification.
  • Test with a default WordPress theme.
  • Check if custom CSS targets WooCommerce buttons/forms.
  • Use shortcode styling attributes where available.

Example styling attributes for multi-product checkout:

[plugincy_one_page_checkout product_ids="152,153,154" primary_color="#4F46E5" border_radius="12px" spacing="20px"]

Shortcode works for admin but not guests

If the shortcode works while logged in but not for visitors, the issue is often cache, product visibility, or session-related.

Check these items

  • Guest checkout is enabled if required.
  • Products are public and purchasable.
  • Product visibility is not hidden.
  • Page cache is not serving logged-in content to guests.
  • WooCommerce session cookies work for guests.
  • Security plugin is not blocking AJAX requests.

Test in a private/incognito browser to confirm guest behavior.


Shortcode works on one page but not another

This usually means the issue is page-specific.

Check the page

  • Page builder settings
  • Template type
  • Cache exclusions
  • JavaScript delay/defer settings
  • Custom CSS/JS on the page
  • Duplicate checkout forms
  • Missing WooCommerce scripts
  • Theme layout differences

Recommended test

Create a new blank WordPress page and add only the shortcode:

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

If it works on the blank page, the issue is likely the original page layout, builder, cache, or custom scripts.


Multiple checkout shortcodes on one page

Avoid placing multiple checkout forms on the same page unless absolutely necessary.

Why this can cause problems

Multiple checkout shortcodes can create:

  • Cart conflicts
  • Duplicate checkout forms
  • Confusing customer experience
  • Payment gateway script issues
  • Unexpected product auto-add behavior
  • Wrong cart contents

Recommendation

Use only one checkout shortcode per page:

[plugincy_one_page_checkout]

or:

[onepaquc_checkout product_id="123"]

Use [plugincy_cart] separately if you only need a cart drawer trigger.


Cache and optimization best practices

Checkout and cart content is dynamic. Caching can easily break shortcodes if not configured properly.

Exclude dynamic pages from cache

Exclude:

  • WooCommerce cart page
  • WooCommerce checkout page
  • My Account page
  • One-page checkout shortcode pages
  • Single checkout shortcode pages
  • Pages with cart drawer shortcode if cart content is cached incorrectly

Avoid delaying required scripts

Do not delay or defer important WooCommerce/cart/checkout scripts without testing.

Be careful with:

  • JavaScript delay
  • JavaScript defer
  • Combine JS
  • Minify JS
  • Remove unused CSS
  • CDN full-page cache
  • Object cache/session handling

Test after every optimization change

After changing cache or optimization settings:

  1. Clear all caches.
  2. Open an incognito window.
  3. Add a product to cart.
  4. Test the shortcode page.
  5. Complete a test checkout.

Page builder best practices

Elementor

Use the Shortcode widget. Avoid placing checkout shortcodes inside tabs, accordions, popups, or hidden sections unless tested.

Gutenberg

Use the Shortcode block.

Divi / Bricks / Oxygen / other builders

Use the builder’s shortcode element/module. If checkout does not render correctly, test the shortcode on a normal WordPress page first.


Landing page best practices

For product landing pages, keep the shortcode page focused.

Recommended layout

Product headline
Short benefits
Product image/video
Trust badges
Checkout shortcode
FAQ
Support/refund note

For one product

Use:

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

For multiple products

Use:

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

Recommended support information to collect

If you contact support, include:

  • Shortcode being used
  • Page URL
  • Product ID or product IDs
  • Product type: simple, variable, grouped, external
  • Theme name
  • Page builder name
  • WooCommerce version
  • Plugin version
  • Cache plugin/CDN name
  • Screenshot of the issue
  • Browser console errors, if any
  • Whether the issue happens for guests, admins, or both

Final recommendation

Start with the simplest shortcode first, confirm it works, then add attributes one by one.

Example:

[onepaquc_checkout product_id="123"]

Then add:

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

This makes it easier to identify which setting or attribute is causing the issue.