• I am trying to remove an action so that I can replace a function in Sensei (WooThemes). I have tried looking around and I’ve tried things such as:

    global $woothemes_sensei;
    remove_action('sensei_single_course_modules_before', array($woothemes_sensei->frontend, 'course_modules_title'),21);

    The action I want to remove is in the class-sensei-modules.php file in the core Sensei plugin. And i’m trying to remove it via a custom plugin.

    Can anyone assist please ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter cwbmuller

    (@cwbmuller)

    Bump ??

    $wootemes_sensei is deprecated.

    Use Sensei() instead.

    In my plugin, I removed the sensei_lesson_video action this way:

    remove_action('sensei_lesson_video', array(Sensei()->frontend, 'sensei_lesson_video'));

    Hope that helps.

    ColinD

    (@colind)

    To remove an action from a theme I found this worked for me. The priority of the add_action seemed to be the key.

    /**
     * Remove Sensei Comments Action
     *
     */
    function themename_sensei_remove_comments(){
    	remove_action( 'sensei_comments', array(Sensei()->frontend, 'sensei_output_comments' ));
    }
    
    add_action( 'sensei_comments', 'themename_sensei_remove_comments', 5);
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Removing WooThemes Sensei actions via an external plugin class file’ is closed to new replies.