add-to-cart-edd.php
5 years ago
add-to-cart-woocommerce.php
5 years ago
course-author.php
5 years ago
course-continue.php
5 years ago
course-in-cart.php
5 years ago
course-price-edd.php
5 years ago
course-price-woocommerce.php
5 years ago
course-price.php
5 years ago
course.php
5 years ago
end_content_wrap.php
5 years ago
footer.php
5 years ago
header.php
5 years ago
loop-after-content.php
5 years ago
loop-before-content.php
5 years ago
loop-end.php
5 years ago
loop-start.php
5 years ago
meta.php
5 years ago
rating.php
5 years ago
start_content_wrap.php
5 years ago
thumbnail.php
5 years ago
title.php
5 years ago
tutor-pagination.php
5 years ago
course-continue.php
32 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Course loop continue when enrolled |
| 5 | * |
| 6 | * @since v.1.7.4 |
| 7 | * @author themeum |
| 8 | * @url https://themeum.com |
| 9 | * |
| 10 | * @package TutorLMS/Templates |
| 11 | * @version 1.7.4 |
| 12 | */ |
| 13 | ?> |
| 14 | |
| 15 | <div class="tutor-course-loop-price"> |
| 16 | <?php |
| 17 | $course_id = get_the_ID(); |
| 18 | $enroll_btn = '<div class="tutor-loop-cart-btn-wrap"><a href="'. get_the_permalink(). '">'.__('Continue Course', 'tutor'). '</a></div>'; |
| 19 | $default_price = apply_filters('tutor-loop-default-price', __('Free', 'tutor')); |
| 20 | $price_html = '<div class="price"> '.$default_price.$enroll_btn. '</div>'; |
| 21 | if (tutor_utils()->is_course_purchasable()) { |
| 22 | |
| 23 | $product_id = tutor_utils()->get_course_product_id($course_id); |
| 24 | $product = wc_get_product( $product_id ); |
| 25 | |
| 26 | if ( $product ) { |
| 27 | $price_html = '<div class="price"> '.$product->get_price_html().$enroll_btn.' </div>'; |
| 28 | } |
| 29 | } |
| 30 | echo $price_html; |
| 31 | ?> |
| 32 | </div> |