How to stop activating a plugin and show admin notice when dependent plugins minimum version is not met
I have a plugin which is dependent on another plugin, in this case WooCommerce.
How can I stop the activation of my plugin and display an admin notice with download link of the dependent plugin, if the version of the dependent plugin is lower than a certain version?
In short, on the activation process my plugin should not be activated and display a notice with download link when any of the following is true:
- WooCommerce plugin is not activated (I have solution for this)
- The version of WooCommerce plugin is less than a certain version (I do not have solution for this)
Note: This question is answering my question partially, but I need to have a full solution to check the version of the dependent plugin and display admin notice accordingly.
Topic wp-dependencies woocommerce-offtopic plugin-development hooks plugins Wordpress
Category Web