TGMPA / TGM-Plugin-Activation

TGM Plugin Activation is a PHP library that allows you to easily require or recommend plugins for your WordPress themes (and plugins). It allows your users to install, update and even automatically activate plugins in singular or bulk fashion using native WordPress classes, functions and interfaces. You can reference bundled plugins, plugins from the WordPress Plugin Repository or even plugins hosted elsewhere on the internet.
http://tgmpluginactivation.com/
GNU General Public License v2.0
1.76k stars 430 forks source link

Logic for Plugin X Lite OR Plugin X Premium #619

Closed prionkor closed 8 years ago

prionkor commented 8 years ago

How should we handle this kind of special case where we recommend Plugin X lite ( which is free ). Now if user have the Plugin X Premium which is an extended version of Plugin X lite. Those two plugins can not be activated together and can create conflict if both activated.

This is one of the common cases now a days as many of developers have lite and premium version of a particular plugin.

Let me know your thoughts.

jrfnl commented 8 years ago

I'd recommend looking for a common function/method which is contained in both the Lite as well as the Premium version of the plugin and setting the is_callable configuration option for the plugin. If the function/method is found, the plugin will be regarded as active, independently of whether the Lite or the Premium version is installed.

For more information, see the detailed configuration information: http://tgmpluginactivation.com/configuration/#h-plugin-parameters

Does that answer your question ?

prionkor commented 8 years ago

Yes, is_callable seems to be right choice! :)