Sometimes, you may need to display a string differently depending on whether a variable is singular or plural. i.e; “1 product in stock” compared to “2 products in stock”. We could of course use an if() statement or even a switch() if there were multiple possibilities here, but for simple use cases, WordPress provides us […]
Product news, tips, and other cool things we make.
We never share your data. Read our Privacy Policy