get_option() returns false when the option does not exist, and also when it exists and holds false. Any setting that can legitimately be off is therefore indistinguishable from…
Omitting permission_callback registers a route that anyone can call. It works, there is no error, and this year there is not even a warning — the notice that…
The failure mode is not a slow query. It is one option holding a megabyte of serialised data, fetched and unserialised on every request, quietly adding both to…
wp_die() in an AJAX handler sends an HTML error page with a 200 status, so the JavaScript sees a successful response containing markup and fails while parsing it.…
Hooking save_post to react to an order being paid works occasionally and misses every transition made from a payment gateway callback, the REST API or WP-CLI. The status…
The two look interchangeable and differ on whether the key already exists: set() overwrites unconditionally, add() fails and returns false. That failure is the useful part. With a…
WP_POST_REVISIONS is a constant, so it applies to the whole site. A catalogue whose products are updated by a nightly import does not want a revision per product…
An import loop calling wp_insert_post() is doing everything a human clicking Publish does: revisions, term counting, ping status, and every plugin listening on save_post. For ten posts that…