I’m trying to override a plugin class with my own.

The plugin class is

  function yith_woocompare_constructor() {
           // stuff here
add_action( 'plugins_loaded', 'yith_woocompare_constructor' );

So in my functions.php I tried to do like that

     remove_action( 'plugins_loaded', 'yith_woocompare_constructor', 0 );   
// now add your own filter
add_action( 'plugins_loaded', 'new_yith_woocompare_constructor', 0 );
   function new_yith_woocompare_constructor()
      // my stuff here 

But It doesn’t seem to be working, what Am I doing wrong ?

Read more here: Override a plugin class


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, ,

Wordpress related questions and answers: