This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action('template_redirect',function(){ | |
| if( is_single() && get_post_type() == 'product' && isset($_GET['redirect'])){ | |
| global $woocommerce; | |
| $found = false; | |
| $product_id = get_the_ID(); | |
| $courses = vibe_sanitize(get_post_meta(get_the_ID(),'vibe_courses',false)); | |
| if(isset($courses) && is_array($courses) && count($courses)){ | |
| if ( sizeof( WC()->cart->get_cart() ) > 0 ) { | |
| foreach ( WC()->cart->get_cart() as $cart_item_key => $values ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action('wplms_batches_extras',function($batch_id){ | |
| $start_batch_date = groups_get_groupmeta($batch_id,'start_batch_date'); | |
| if(!empty($start_batch_date)){ | |
| echo 'STARTS '.wp_date( get_option( 'date_format' ), $start_batch_date ); | |
| } | |
| },10,1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action('wplms_front_end_quiz_end',function($quiz_id){ | |
| ?> | |
| <div class="container"> | |
| <ul class="data_stats" style="position:relative" data-id="<?php echo $quiz_id; ?>" data-type="quiz"> | |
| <li><a id="download_Stats" class="button full">View quiz stats</a></li> | |
| </ul> | |
| <div class="main_content"> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action('init',function(){ | |
| if(class_exists('ElementorPro\Modules\ThemeBuilder\Classes\Locations_Manager')){ | |
| $init = new ElementorPro\Modules\ThemeBuilder\Classes\Locations_Manager(); | |
| add_action( 'template_redirect', [ $init, 'register_locations' ] ,1); | |
| } | |
| },1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_filter('wplms_cs_get_course_unit_durations',function($human_time,$time_in_seconds){ | |
| return $time_in_seconds/3600.' hours'; | |
| },10,2); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_filter('wplms_get_element_icon',function($icon,$type){ | |
| if($type == 'video'){ | |
| $icon = 'YOUR ICON CLASS'; | |
| } | |
| return $icon; | |
| },10,2); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_filter('wplms_get_course_tabs',function($tabs){ | |
| unset($tabs['announcementsnews']); | |
| unset($tabs['qna']); | |
| unset($tabs['notes']); | |
| return $tabs; | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action('wplms_user_course_application',function($course_id){ | |
| global $wpdb; | |
| $count = $wpdb->get_var("SELECT COUNT(*) FROM {$wpdb->usermeta} WHERE meta_key = 'apply_course$course_id'"); | |
| if($count >=10){ | |
| update_post_meta($course_id,'vibe_course_apply','H'); //Disable Course Applications, returns to previous pricing mode. | |
| } | |
| },10,1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| //Header File | |
| if ( ! defined( 'ABSPATH' ) ) exit; | |
| ?> | |
| <!DOCTYPE html> | |
| <html <?php language_attributes(); ?>> | |
| <head> | |
| <meta charset="<?php bloginfo( 'charset' ); ?>"> | |
| <?php | |
| wp_head(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_filter('jwt_auth_token_validate_before_dispatch',function($data){ | |
| $data['redirect_component'] ='https://YOUR redirect page URL'; | |
| return $data; | |
| }); |