Are functions in main plugin file called before function bound to register_activation_hook runs?

In my plugin, I am doing a minimum-supported PHP version compatibility check via a function bound to register_activation_hook and halting activation for those on PHP version less than the minimum supported PHP version.
But the other functions in the main plugin file are also called during above compatibility check and since a couple of them have code that is not compatible with older PHP version, it results in a fatal error message instead of showing an intended message(your PHP version is not supported) on activation. So the question here is, why do other functions in the main file get called before the call to function bound to register_activation_hook?

Read more here:: Are functions in main plugin file called before function bound to register_activation_hook runs?

Leave a Reply

Your email address will not be published. Required fields are marked *