π©Ή WP Bones 2.1.1 β activation finds its own plugin
byβ’
WP Bones 2.1.1 is out 𦴠a small patch, two fixes π©Ή
π Activation sees its own plugin. Since 1.8.0 the activation hook ran with an empty slug and no version, so the options it aligned were saved to a row with no name. Fixed.
ποΈ migrate:create creates the table you name. It always wrote my_plugin_products.

β One more test in the suite, 175 now, on PHP 8.1 to 8.4.
β¬οΈ composer update wpbones/wpbones
π Docs, boilerplates and live Playground demos: https://wpbones.com
Ever bumped into either of these? I'd love to hear π
26 views


Replies
Small activation bugs be surprisingly annoying because everything looks fine until the plugin actually runs. Was this one caught through testing or from a real project?
@misti__hassigΒ neither really... it turned up while I was reworking how migrations run for 3.0, which meant looking closely at what activation actually sees. on a real install the plugin's own name and version came back empty, and it had been like that since 1.8.0, almost two years. nobody reported it, since nothing visibly breaks: activation just saved its options under a row with no name π
which is your point exactly: the unit tests couldn't see it, since activation only happens inside a running WordPress and the suite doesn't boot one. so the fix was checked on a real install, not by the tests