Add review Button in course page

Add the following code in wplms-customizer.php or child theme->functions.php

add_action('wplms_after_course_description','myreview_button');
function myreview_button(){
    $course_id = get_the_ID();
    $user_id = get_current_user_id();
    ?>
    <form action="<?php echo get_permalink($course_id); ?>" method="post">
    <input type="submit" name="review_course" class="review_course unit_button full button" value="<?php _e('REVIEW COURSE ','vibe'); ?>" />
    <?php wp_nonce_field($course_id,'review'); ?>
    </form>
    <?php
 
}

 

Leave a Reply

Your email address will not be published. Required fields are marked *