A WooCommerce product is a post, so get_post() returns something usable and the price is right there in the meta. It is also wrong for variable products, where…
Two hundred and forty require_once calls where load order was load-bearing, moved onto an autoloader one namespace at a time without a big-bang rewrite.
Printing a <script> tag straight into a template puts it wherever the template happens to run, which is why so many themes have jQuery loaded twice and a…
OPcache has shipped with PHP since 5.5 and is disabled in several distribution builds, which means a good number of production servers are compiling every file on every…
Floating point cannot represent 0.1 exactly, so money arithmetic accumulates error that shows up as a total that is one cent off. The usual response is to round…
DateTime::modify() mutates the object and returns it. Because it returns something, it reads like a pure function, so it gets assigned to a new variable — and then…
Every hand-rolled password scheme gets the same three things wrong: the algorithm is too fast, the salt is reused or stored badly, and the comparison is not constant…