• Resolved vandung93

    (@vandung93)


    Hello team,

    Could you give me some ways to custom template for course prerequisites? (Tutor Pro)

    I can see you hook template to action ‘tutor_course/single/lead_meta/after’ in class Prerequisites. But this class not used singleton structure, so i can’t remove this action.

    By the way, i want to know is there a premium support system? I bought Tutor LMS Pro Unlimited Licenses.

    Thanks.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter vandung93

    (@vandung93)

    Hello,
    is there anything news on this?

    Hello,
    Use this code,

    add_action( 'tutor_course/single/lead_meta/after', 'remove_prerequisites_action', 9 );
    function remove_prerequisites_action(){
        remove_action('tutor_course/single/lead_meta/after', 'tutor_course/single/lead_meta/after', 10, 2);
    }

    This is what you were trying, but the priority was the wrong way around. 11 runs after 10.

    Thanks

    Thread Starter vandung93

    (@vandung93)

    Hello, before you give any resolutions, please make sure its working for you

    Hello,
    I am really sorry, please don’t worry, use this code,

    add_action( 'tutor_course/single/lead_meta/after', 'remove_prerequisites_action' );
    function remove_prerequisites_action() {
        remove_action( 'tutor_course/single/lead_meta/after', array( 'Prerequisites', 'prerequisites_courses_lists' ) );
    }

    I hope your problem will be solved.
    Thanks

    Thread Starter vandung93

    (@vandung93)

    It’s not working.
    You CAN’T remove action/filter if your class not used Singleton structure.

    Other resolution:
    If you don’t want to edit your class to Singleton class then you need update function “prerequisites_courses_lists”

    At line number 69: instead of call

    include TUTOR_PREREQUISITES()->path.'views/frontend/show-course-prerequisites.php';

    use this
    tutor_load_template('course.single.course-prerequisites');

    • This reply was modified 4 years, 7 months ago by vandung93.

    Hey @vandung93,

    Thank you so much for taking the time to help us understand the problem.

    We have added template support on prerequisites. It will be available on the update coming next week. We are also working on your email. You will receive a reply within today.

    Thread Starter vandung93

    (@vandung93)

    Hello again,

    New Tutor LMS Pro version is override template now, but you can’t move it.
    For eg: I want to display prerequisites list below top lead info.

    Move your hook out of the Class to make themes or plugins can remove it.

    add_action('tutor_course/single/lead_meta/after', array($this, 'prerequisites_courses_lists'));

    To:
    add_action('tutor_course/single/lead_meta/after', 'tutor_prerequisites_prerequisites_courses_lists');

    Hi,

    I have reported to the developer. Please allow us some time. If you want, you can send pull request to our Github repo- https://github.com/themeum/tutor

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Custom template for course prerequisites’ is closed to new replies.