Stockline documentation1.x
Help

Troubleshooting

What to check when the stock line doesn't change, looks wrong in your theme, or shows an old message.

The stock line didn't change after I saved

Work through these in order:

  1. Clear your cache. Product pages are often cached by a caching plugin, your host or a CDN, so shoppers (and you) see the page as it was. Clear the cache, then reload the product page. Logged-in admins often bypass the cache, so also check in a private browser window.
  2. Check the product's state. The message you changed may not be the state the product is in. A product with 3 left and a low stock threshold of 5 is in low stock, not in stock. A product with no stock but backorders allowed is on backorder, not out of stock. Look at the product's Inventory tab, and the thresholds under WooCommerce → Settings → Products → Inventory.
  3. Check the message isn't empty. An empty message keeps WooCommerce's text, which can look like Stockline isn't working.
  4. Check that your theme shows a stock line. Stockline changes the line WooCommerce builds; it doesn't add one where the theme or a page builder leaves it out. If WooCommerce's own "In stock" or "Out of stock" text never appeared on the page, Stockline has nothing to change there. For a block theme, the stock line is part of the Add to Cart with Options block on the single product template.

In stock products show nothing

WooCommerce shows no stock line for in-stock products that don't track their quantity. Enter an In stock message and Stockline shows it on those products too.

There are two icons

Some themes draw their own icon before the stock line. Stockline hides it when the state has a Stockline icon, using a CSS rule that most themes respect. If you still see two, choose No icon for that state to keep the theme's, or remove the theme's with CSS:

.woocommerce div.product p.stock.stockline::before { display: none; }

The colour or badge doesn't show

  • On a product page: an empty colour field keeps the theme's colour; that's intended. If a colour is set but the text stays the theme's colour, a theme rule with higher specificity is winning. Add this to Appearance → Customize → Additional CSS (or your child theme):

    .stockline--colored { color: var(--stockline-color) !important; }
    
  • Outside product pages (a Single Product block on a landing page, a quick view popup): the message is there but unstyled, because Stockline's stylesheet only loads on product pages. Load it on that page with the stockline_enqueue_styles filter; see Filters and hooks.

  • With CSS optimisation plugins: Stockline puts its colour rules in an inline style attached to its stylesheet. If an optimiser removes or delays inline CSS, exclude the stockline stylesheet from it.

The message looks too big or too small

In the plain style the stock line uses your theme's text size; in the badge style it's 90% of it. Change it with CSS, for example:

.stockline--badge { font-size: 1rem; }

The settings preview looks different from my store

The preview uses Stockline's stylesheet with the admin font. Your store shows the same colours, icons and badge, in your theme's font and size.

Still stuck?

Temporarily switch to a default theme such as Twenty Twenty-Five, with only WooCommerce and Stockline active. If the stock line works there, the difference is in your theme or another plugin. Ask in the Stockline support forum on WordPress.org, with what you see, your theme, and the product's stock settings. Stockline Pro customers can also contact us through extendiment.com.