PluginProbe
Tutor LMS – eLearning and online course solution / 1.0.0-alpha
Tutor LMS – eLearning and online course solution v1.0.0-alpha
4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 4.0.0 3.9.15 3.9.14 3.9.13 3.9.12 3.9.11 trunk 1.0.0 1.0.0-alpha 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 All 191 releases
tutor / templates / loop / course-price.php
course-price.php
30 lines 795 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Course loop price
5 *
6 * @since v.1.0.0
7 * @author themeum
8 * @url https://themeum.com
9 */
10 ?>
11
12 <div class="tutor-course-loop-price">
13 <?php
14 $course_id = get_the_ID();
15 $enroll_btn = '<div class="tutor-loop-cart-btn-wrap"><a href="'. get_the_permalink(). '">'.__('Get Enrolled', 'tutor'). '</a></div>';
16 $price_html = '<p class="price"> '.__('Free', 'tutor').$enroll_btn. '</p>';
17 if (tutor_utils()->is_course_purchasable()) {
18 $enroll_btn = tutor_course_loop_add_to_cart(false);
19
20 $product_id = tutor_utils()->get_course_product_id($course_id);
21 $product = wc_get_product( $product_id );
22
23 if ( $product ) {
24 $price_html = '<p class="price"> '.$product->get_price_html().$enroll_btn.' </p>';
25 }
26 }
27
28 echo $price_html;
29 ?>
30 </div>