[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.128.78.107: ~ $
<?php
/**
 * A single course loop add to cart
 *
 * @package Tutor\Templates
 * @subpackage WooCommerceIntegration
 * @author Themeum <support@themeum.com>
 * @link https://themeum.com
 * @since 1.4.3
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
use Tutor\Ecommerce\CartController;
use Tutor\Models\CartModel;

$course_id = get_the_ID();
$user_id   = get_current_user_id();

$is_course_in_user_cart = CartModel::is_course_in_user_cart( $user_id, $course_id );
$cart_page_url          = CartController::get_page_url();

$conditional_class = is_user_logged_in() ? 'tutor-native-add-to-cart' : 'tutor-open-login-modal';

ob_start();

if ( $is_course_in_user_cart ) {
	?>
	<a href="<?php echo esc_url( $cart_page_url ? $cart_page_url : '#' ); ?>" class="tutor-btn tutor-btn-outline-primary tutor-btn-md <?php echo esc_attr( $cart_page_url ? '' : 'tutor-cart-page-not-configured' ); ?>">
		<?php esc_html_e( 'View Cart', 'tutor' ); ?>
	</a>
	<?php
} else {
	?>
	<div class="list-item-button"> 
		<button data-quantity="1" class="tutor-btn tutor-btn-outline-primary tutor-btn-md tutor-btn-block <?php echo esc_attr( $conditional_class ); ?>" data-course-id="<?php the_ID(); ?>" rel="nofollow">
			<span class="tutor-icon-cart-line tutor-mr-8"></span>
			<span class="cart-text"><?php esc_html_e( 'Add to Cart', 'tutor' ); ?></span>
		</button> 
	</div>
	<?php
}

echo apply_filters( 'tutor_course_loop_add_to_cart_button', ob_get_clean(), $course_id ); //phpcs:ignore

Filemanager

Name Type Size Permission Actions
add-to-cart-edd.php File 1.37 KB 0644
add-to-cart-tutor.php File 1.43 KB 0644
add-to-cart-woocommerce.php File 2.49 KB 0644
course-author.php File 1.44 KB 0644
course-continue.php File 2.12 KB 0644
course-in-cart.php File 1.43 KB 0644
course-price-edd.php File 4.07 KB 0644
course-price-tutor.php File 3.71 KB 0644
course-price-woocommerce.php File 4.42 KB 0644
course-price.php File 4.45 KB 0644
course.php File 1.56 KB 0644
end_content_wrap.php File 195 B 0644
enrolled-course-progress.php File 986 B 0644
footer.php File 239 B 0644
header.php File 1.23 KB 0644
loop-after-content.php File 232 B 0644
loop-before-content.php File 268 B 0644
loop-end.php File 232 B 0644
loop-start.php File 581 B 0644
meta.php File 2.44 KB 0644
rating.php File 1.18 KB 0644
start_content_wrap.php File 221 B 0644
thumbnail.php File 619 B 0644
title.php File 364 B 0644