How to stop activation addon if the main plugin is not activated
I found the solution. First of all, I discover that… you cannot use the admin_notices hook inside the activation hook function. More details here Thanks the link above, I found this solution : class MyAddon { const ACTIVATION_ERROR = “foo-activation-error” public function __construct(){ register_activation_hook( __FILE__, array( $this, ‘install’ ) ); if( is_admin() ){ add_action( “admin_init”, … Read more