admin管理员组

文章数量:1332395

is it possible to modify plugin by removing action and then adding a new with new function?

In plugin I have this:

namespace OCDI;

class ImportActions {
    public function register_hooks() {
        add_action( 'pt-ocdi/customizer_import_execution', array( $this, 'customizer_import' ), 10, 1 );
    }
}

So I tried this:

remove_action( 'pt-ocdi/customizer_import_execution', array( '\OCDI\ImportActions', 'customizer_import' ), 10, 1 );

But it does not work(

customizer_import function still working so the code in themes functions.php should run after plugins code.

I checked looks plugin loads all the main code in after_setup_theme action.

Can someone clarify why so?

It is not possible to make small changes to a plugin? Perhaps I can hire someone?

Kind regards

本文标签: functionsModifying a WordPress Plugin