Displaying activation errors and stopping activation
-
I thought it would be nice if my plugin would display any errors when my activated AND stop the activation if errors did happen. However, there doesn’t seem to be any way to do this properly.
Displaying error itself is a problem. Whether I simply echo the message or echo using an WP_Error object, WordPress suppresses the output and simply gives a notice that my plugin sent unexpected output during activation.
I’ve also tried using die() to stop execution but WordPress apparently retries and I end up with a fatal error that it cannot redeclare class. Regardless of that, the plugin status becomes activated.
Anybody has any idea how this can be achieved?
The topic ‘Displaying activation errors and stopping activation’ is closed to new replies.