Shortcode Troubleshooting and Best Practices

Shortcodes Reference
Updated Nov 8, 20263 min read

When a shortcode shows nothing or the wrong thing, the cause is usually simple. Find what you see in the table, then work through the steps below it.

What you see and what causes it

What you seeLikely causeWhat to do
A blank space where the checkout should beYou are on the free plugin, or the page already has a checkout formInstall Pro. Keep one checkout form per page.
“Pro version only”The licence is not activeActivate it on the Plugin License tab.
“Please provide product IDs”No product was foundCheck IDs and slugs. Publish the product.
The shortcode shows as plain textIt is in a Paragraph or Code blockUse a Shortcode block.
Up to 100 products and a huge cartNo products are listed in the shortcodeAdd product_ids, category or tags.
Style options are ignoredThe template is not Product Selection, or a value has “px”Use them with template="product-selection", and plain numbers.
A filter by attribute finds nothingThe name has pa_Write attribute="color".
A variation was not addedThe variation belongs to another productCheck both IDs.
The cart empties when the page opensEmpty Cart on Page Load is onTurn it off under One Page Checkout, or remove clear_cart.
An item the shopper removed stays removed on reloadSetup runs once per visitThis is normal.
Two cart buttonsEnable Sticky Cart and the shortcode are both onUse one of them.

Quick checklist

  1. Check that WooCommerce and the plugin are active, and which version you have.
  2. Use straight quotes. Quotes copied from a document can come out curly, which breaks the shortcode.
  3. Check the spelling of every option.
  4. Test logged out, in a private browser window.

Test on a blank page

This separates a shortcode problem from a page problem.

  1. Create a new page with only the shortcode, using one product ID.
  2. View it in a private window.
  3. If it works, add your other options one by one until it breaks.
  4. If it works only on the blank page, something on your real page is in the way, such as a second checkout form or a page builder section.

In a page builder

  • Use the builder’s own shortcode element, such as those in Elementor, Divi, Bricks or Oxygen.
  • Avoid placing a checkout form inside tabs, sliders or popups from your builder, because the form may not start properly when hidden.
  • Check the live page, as builder previews often do not run a checkout.

In a theme file

If you add a shortcode with PHP, use this:

<?php echo do_shortcode( '[plugincy_cart drawer="right"]' ); ?>

Cache and speed plugins

The plugin asks caching tools not to store pages with checkout forms, but a CDN or strong optimisation can still get in the way. Pages with only [plugincy_cart] are not covered by that request.

  • Exclude cart, checkout and account pages from caching.
  • Turn off JavaScript delay or combine options for test purposes.
  • Clear every cache after a change.

Best practices

  • Start with the simplest shortcode, then add options.
  • Put the form near the top of the page, so shoppers do not have to look for it.
  • Give the page one clear offer, with a short line about delivery or returns near the form.
  • After any change, place a test order as a guest and on a phone.

Asking for help

If you contact us, send the shortcode you used, the page link, your plugin version, your theme and any message on screen. That lets us find the problem much faster.