A question on init and activation hooks

I think you’re mistaken and the activation didn’t work correctly: you won’t have the new post type set up in the permalinks cache. Here’s activate_plugin() in 5.4. You can see the sequence is wp-admin/plugins.php loads without the new plugin; init is triggered now activate_plugin() PHP-includes the new plugin, loading it and registering its hooks; it’s … Read more