enrolled
6 years ago
add-to-cart-edd.php
6 years ago
add-to-cart-woocommerce.php
6 years ago
add-to-cart.php
6 years ago
complete_form.php
6 years ago
course-benefits.php
6 years ago
course-content.php
6 years ago
course-enroll-box.php
6 years ago
course-enrolled-box.php
6 years ago
course-requirements.php
6 years ago
course-target-audience.php
6 years ago
course-topics.php
6 years ago
instructors.php
6 years ago
lead-info.php
6 years ago
login.php
6 years ago
material-includes.php
6 years ago
q_and_a_turned_off.php
6 years ago
review-form.php
6 years ago
reviews.php
6 years ago
social_share.php
6 years ago
tags.php
6 years ago
wc-price-html.php
6 years ago
add-to-cart-woocommerce.php
36 lines
| 1 | <?php |
| 2 | /** |
| 3 | * @package TutorLMS/Templates |
| 4 | * @version 1.4.3 |
| 5 | */ |
| 6 | |
| 7 | |
| 8 | $product_id = tutor_utils()->get_course_product_id(); |
| 9 | $product = wc_get_product( $product_id ); |
| 10 | if ($product) { |
| 11 | ?> |
| 12 | |
| 13 | <div class="tutor-course-purchase-box"> |
| 14 | |
| 15 | <form class="cart" |
| 16 | action="<?php echo esc_url( apply_filters( 'tutor_course_add_to_cart_form_action', get_permalink( get_the_ID() ) ) ); ?>" |
| 17 | method="post" enctype='multipart/form-data'> |
| 18 | |
| 19 | <?php do_action( 'tutor_before_add_to_cart_button' ); ?> |
| 20 | |
| 21 | <button type="submit" name="add-to-cart" value="<?php echo esc_attr( $product->get_id() ); ?>" class="single_add_to_cart_button tutor-button alt"> <i class="tutor-icon-shopping-cart"></i> <?php echo esc_html( $product->single_add_to_cart_text() ); ?> |
| 22 | </button> |
| 23 | |
| 24 | <?php do_action( 'tutor_after_add_to_cart_button' ); ?> |
| 25 | </form> |
| 26 | |
| 27 | </div> |
| 28 | |
| 29 | <?php |
| 30 | }else{ |
| 31 | ?> |
| 32 | <p class="tutor-alert-warning"> |
| 33 | <?php _e('Please make sure that your product exists and valid for this course', 'tutor'); ?> |
| 34 | </p> |
| 35 | <?php |
| 36 | } |