Now it always shows the stock quantity but should be only visible below 3 so lets make an example 2 in stock should be red and display 3 in stock should only give in stock in green- only below 3 should display quantity 2 left in stock or 1 in red. Thats whats happen on variable product, but on single product also in 1 in stock it shows in green.
In private the single and variable product to check