diff --git a/templates/course/course-carousel.php b/templates/course/course-carousel.php index 21194b7..87f2f36 100644 --- a/templates/course/course-carousel.php +++ b/templates/course/course-carousel.php @@ -11,14 +11,7 @@ /* * query arguments */ - if ( ! function_exists( 'is_bundle_enabled' ) ) { - function is_bundle_enabled() { - $basename = plugin_basename( TUTOR_COURSE_BUNDLE_FILE ); - $is_enabled = tutor_utils()->is_addon_enabled( $basename ); - return $is_enabled; - } - } - if ( in_array( 'tutor-pro/tutor-pro.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) && is_bundle_enabled() ) { + if ( tutor_utils()->is_addon_enabled( 'course-bundle' ) ) { // plugin is activated $carosel_postype = array( 'courses', 'course-bundle' ); } else { diff --git a/templates/course/course-list.php b/templates/course/course-list.php index 652bfc9..107ee10 100644 --- a/templates/course/course-list.php +++ b/templates/course/course-list.php @@ -17,16 +17,8 @@ * query arguments */ $paged = isset( $_GET['current_page'] ) ? sanitize_text_field( $_GET['current_page'] ) : 1; - // check for plugin using tutor pro - if ( ! function_exists( 'is_bundle_enabled' ) ) { - function is_bundle_enabled() { - $basename = plugin_basename( TUTOR_COURSE_BUNDLE_FILE ); - $is_enabled = tutor_utils()->is_addon_enabled( $basename ); - return $is_enabled; - } - } - if ( in_array( 'tutor-pro/tutor-pro.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ), true ) && is_bundle_enabled() ) { + if ( tutor_utils()->is_addon_enabled( 'course-bundle' ) ) { // plugin is activated $listing_postype = array( 'courses', 'course-bundle' ); } else {