Home › Forums › WoodMart support forum › Stock Status not showing
Stock Status not showing
- This topic has 5 replies, 4 voices, and was last updated 1 month, 1 week ago by
Aizaz Imtiaz Awan.
-
AuthorPosts
-
October 13, 2025 at 4:27 pm #690651
lemali.chParticipantIf we don’t track the stock quantity of a product, then the stock status on the product page is not showing.
The product is “in stock” but there is no green stock status label showing.
Thanks for your help
Attachments:
You must be logged in to view attached files.October 14, 2025 at 8:57 am #690729
Hung PhamParticipantHi travel-gadgets.ch,
Thanks for reaching to us and appreciate your patience.
You are using Custom WooCommerce Builder layouts, which are part of WooCommerce Builder from WoodMart. Navigate to Layouts > Edit Single Product layout and add the
product stock statuswidget in the layout to show this.Further, you can read more about the Layout Builder here: https://xtemos.com/docs-topic/woodmart-woocommerce-layout-builder/
Best Regards,
Hung PDOctober 15, 2025 at 4:03 pm #691073
lemali.chParticipantHello.
I think maybe I did not clarify it correctly. I try to explain it more.
We already use the product stock status label and it works fine for other products.
BUT it only works if we track the stock status of a product. Let’s say a product has 10pcs in stock, then the label shows: “In Stock”.
But for many of our products we don’t track the stock status and we only set the product to “In Stock”, that’s where the Stock Status Label won’t show at all.
In the backend, there will be no “number in stock” and we will not “manage the stock” for these products. But we just put the stock status to “in stock” (according to my last print screen sent) . But somehow if this is the case, the stock status label won’t appear on the frontend.
October 16, 2025 at 5:38 pm #691389
Bogdan DonovanKeymasterHi,
In WooCommerce, each product variation within a variable product can have its own stock quantity. Therefore, the stock status check of each variation happens the moment a variation is selected. This check is not related to the specific quantity of the product, and whether the value is “In stock” or a concrete number, the stock status will only be retrieved after a variation is selected. This is the standard behavior of the WooCommerce plugin, and you can see how it works by default by viewing the standard WooCommerce theme called Storefront (https://monosnap.ai/file/Hsn1vFzELLk7vfW5ZoiNrf8Xe7MJqg). Unfortunately, we currently do not have the ability to change this, and we don’t have an option to override this behavior.
Kind Regards
October 18, 2025 at 2:04 pm #691649
lemali.chParticipantHello and Thanks for clarification.
But then something is not working as it should.
Look at this example:
https://lemali.ch/kosmo-trolley-koffer-m-l/
Please select the variant “Black” + “L” -> Here you see, the label is working correctly, because this product is out of stock.
But if you select all the other variants, no label is showing, altough the products are in stock.
See images attached.But for all the other products, where we manage stock quantity with a concrete number, the label is working as expected.
Example: https://lemali.ch/manta-schlafmaske/I hope
Attachments:
You must be logged in to view attached files.October 18, 2025 at 3:03 pm #691665
Aizaz Imtiaz AwanKeymasterHello,
In this case, the behavior you’re describing seems specific to products where “Manage stock” is disabled. When stock management is off and the status is manually set to “In stock,” WooCommerce doesn’t always output the stock status data in the variation response, which is why the label doesn’t appear on the frontend.
For products with managed stock quantities, WooCommerce includes this data automatically, which is why the label displays correctly.
This behavior comes directly from WooCommerce’s core logic and not from the theme, so the label can only display when WooCommerce passes the stock status information for that variation.
Sorry to say, there are no options in theme settings to change this behaviour.
I have searched for a possible solution and found a custom function that you can add to your functions.php file. I have tested this code on our test site, and it is working fine.
If the provided code does not work as expected, unfortunately, we are unable to modify it further.
Add this to your theme’s functions.php file of the theme.
// Show stock status label for variations without managed stock add_filter( 'woocommerce_get_stock_html', function( $html, $product ) { if ( $product->is_type( 'variation' ) && ! $product->managing_stock() ) { if ( $product->is_in_stock() ) { $html = '<p class="stock in-stock">' . esc_html__( 'In stock', 'woocommerce' ) . '</p>'; } else { $html = '<p class="stock out-of-stock">' . esc_html__( 'Out of stock', 'woocommerce' ) . '</p>'; } } return $html; }, 10, 2 );Hope this Helps!
Best Regards,
-
AuthorPosts
- You must be logged in to create new topics. Login / Register
