A brand-new “Run Everywhere” PHP snippet – even a trivial one-liner registering a shortcode – silently failed to register whenever one specific, unrelated, pre-existing snippet was also active.
Two Independently-Valid PHP Snippets Can Silently Block Each Other’s Registration
⚡ Quick Fix (TL;DR)
The Culprit: Both snippets passed php -l individually and executed cleanly through a full WordPress-function-stub test in isolation. No PHP error appeared anywhere – not the server's own error log, not the code-snippet plugin's internal error log. The failure only showed up as the shortcode tag rendering as literal unprocessed text on the page.
The Fix: Systematic bisection was the only thing that actually worked: deactivating every other active snippet one at a time (ruling out content, size, and execution order along the way) eventually proved the interference was specific to how the snippet-management plugin combines multiple "Run Everywhere" PHP snippets into one execution context – not a bug in either snippet's own code. The practical fix was converting both snippets into standalone plugin files instead, which fully resolved it. When two provably-correct pieces of code fail only in combination and never independently, suspect the platform combining them, not either piece itself.
Tagged in :
More from the field
Bisect to an Empty Baseline Before Trusting Any Single Theory
.
Multiple plausible-sounding theories for a bug each turned out to be wrong when actually tested – time was spent building fixes…
A Security Dashboard’s Activity Log Can Lag a Full Day Behind Real Time
.
Trying to check a security tool’s activity log for an event that had just happened showed nothing at all.