Conflicting versions of Redux; blocks new version
-
I’m running into an issue when I have a plugin (Plugin A) installed that uses version: 3.6.15 Redux.
My plugin (Plugin B) uses Version 4.1.26.I receive the error
Uncaught Error: Call to undefined method Redux::set_args()
I think this is because Plugin A is loaded first and does not have the methods that Redux V4 uses.I used the provided here: https://devs.redux.io/guides/advanced/embedding-redux.html to embed the plugin (for if the user does not want to install Redux plugin)
if ( !class_exists( 'ReduxFramework' ) && file_exists( dirname( __FILE__ ) . '/ReduxFramework/redux-core/framework.php' ) ) { require_once( dirname( __FILE__ ) . '/ReduxFramework/redux-core/framework.php' ); } if ( !isset( $redux_demo ) && file_exists( dirname( __FILE__ ) . '/ReduxFramework/sample/sample-config.php' ) ) { require_once( dirname( __FILE__ ) . '/ReduxFramework/sample/sample-config.php' ); }
I tried changing the !class_exists to !method_exists( ‘ReduxFramework’, ‘set_args’ ) but this did not work.
Deactivating Plugin A, or activating the installed WordPress Redux plugin resolves my issues. However, It would be nice if there was a solution or workaround for this?
- The topic ‘Conflicting versions of Redux; blocks new version’ is closed to new replies.