realbigplugins / caldera-forms-mailpoet

GNU General Public License v3.0
0 stars 0 forks source link

[MAJOR] There is no safe check if plugin is activated. #2

Closed Shelob9 closed 5 years ago

Shelob9 commented 5 years ago

This check only assumes every install of Caldera Forms has the same directory path. That's not good: https://github.com/realbigplugins/caldera-forms-mailpoet/blob/master/mailpoet-caldera-integration.php#L151

Check if the constant CFCORE_VER is defined like we do in all of our add-ons.

d4mation commented 5 years ago

A similar check should likely be in place for MailPoet. Either for a Constant, Class Name, or Function Name.

Checking against directory names is never reliable.

the-wooninjas commented 5 years ago

We have changed the logic to check the dependency plugins, Now we are using Caldera Form and MailPoet constants( CFCORE_VER and MAILPOET_VERSION ) for dependency.

Shelob9 commented 5 years ago

Using MAILPOET_VERSION is unsafe. In general, the lack of consistent naming of classes, functions and constants is a blocker.

Shelob9 commented 5 years ago

I was wrong about MAILPOET_VERSION