If you have your own WooCommerce online shop, you will quickly find that the countless setting options also include some functions that unfortunately cannot be switched off directly with just one click. This includes, among other things, the display of "In stock" or "XX in stock". In addition to the setting in the WooCommerce options, the note text cannot be completely removed.
The often mentioned solution to hide it via CSS is unclean and not to recommend!
Better in the functions.php of the template (preferably a child template)
// Remove variation stock data from product page display
function woocommerce_remove_variation_stock_display( $data ) {
unset( $data['availability_html'] );
return $data;
}
add_filter( 'woocommerce_available_variation', 'woocommerce_remove_variation_stock_display', 99 );
Recommendation in order not to have to work directly in the template and code -> WordPress plugin code snippets
There is the standard Woocommerce function: It specifies whether products should be displayed on the shop page, in the WooCommerce widgets, anywhere on the page despite being "Out of Stock", i.e. "not available / not available".
Only the individual product page shows "Out of Stock" instead of "Add to Cart".
To change this, follow the 3 steps below (see screenshot):
You can also choose when the inventory should be displayed.
Our recommendation: Only show when stocks are low Conversion to increase.
Do you have questions about WooCommerce or need help? Your contact person:
Email: fi@vastcob.com
Florian Ibe
Please wait while you are redirected to the right page ...
Please share your location to continue.
Check our help guides for more info.