• in the original LearnPress plugin hooks file there is this action:

    add_action( 'learn-press/course-meta-secondary-left', LP()->template( 'course' )->callback( 'single-course/meta/duration' ), 10 );

    I’m trying to remove this action and then replace it with this code:

    remove_action( 'learn-press/course-meta-secondary-left', LP()->template( 'course' )->callback( 'single-course/meta/duration' ), 10 );
    
    add_action( 'learn-press/course-meta-secondary-left', LP()->template( 'course' )->text( 'test hi' ), 10 );

    in function.php.

    the remove does not work, my action is added to the existing one.

    • This topic was modified 3 years, 2 months ago by ipanca.
Viewing 1 replies (of 1 total)
  • Plugin Support brianvu-tp

    (@briantp)

    Hi,

    You can try to use this code

    
    LP()->template( 'course' )->remove( 'learn-press/course-meta-secondary-left', array( 'single-course/meta/duration', array() ), 10 );
    

    Thanks

Viewing 1 replies (of 1 total)
  • The topic ‘Remove action ip-template-hooks.php plugin WordPress LearnPress’ is closed to new replies.