WooCommerce Product get_stock_quantity() method return null
I have a problem when I try to retrieve the available quantity of a product in my view. This is my code : function wcs_custom_get_availability( $availability, $_product ) { global $product; // Change In Stock Text if ( $_product->is_in_stock() )…