From cafd56a0f5acbc4211fc5e0690b3281a415b3d5a Mon Sep 17 00:00:00 2001 From: magepeopleteam Date: Thu, 5 Nov 2020 12:16:20 +0000 Subject: [PATCH] v 3.3.8 released --- css/style.css | 4 +- inc/mep_event_fw_meta.php | 47 ++++++++++ inc/mep_event_meta.php | 7 +- inc/mep_extra_price.php | 7 +- inc/mep_functions.php | 101 +++++++--------------- inc/template-prts/event_extra_service.php | 3 +- inc/template-prts/event_loop_list.php | 4 +- inc/template-prts/single-events.php | 6 ++ readme.txt | 10 ++- templates/single/extra_service_list.php | 4 +- templates/themes/theme-1.php | 3 +- woocommerce-event-press.php | 2 +- 12 files changed, 109 insertions(+), 89 deletions(-) diff --git a/css/style.css b/css/style.css index 20a9f4c..a102a75 100644 --- a/css/style.css +++ b/css/style.css @@ -815,13 +815,13 @@ div.column_style .mep_list_thumb img{height:160px;} /******Style added by sumon*******/ div.mep_event_list div.mage_grid_box{-webkit-flex-wrap: wrap;flex-wrap: wrap;} div.two_column{width:calc(50% - 18px);margin: 0 15px 15px 0;} - div.four_column{width:calc(25% - 18px);margin: 0 15px 15px 0;} - div.item_hover_effect{position:absolute;left:0;top:0;right:0;bottom:0;background-color:#0009;display:none;-webkit-justify-content: center;justify-content: center;-webkit-align-items: center;align-items: center;} .mep-event-list-loop:hover div.item_hover_effect{display: -webkit-flex;display: flex;} div.item_hover_effect a{font-size:22px;font-weight:500;color:#fff;padding:15px 30px;border-radius:5px;background-color:#346B80;transition: 250ms ease-in-out;border:1px solid #FFF;} div.item_hover_effect a:hover{color:#346B80;background-color:#fff;border:1px solid #346B80;} +.mep-event-list-loop.column_style {-webkit-box-sizing: border-box;box-sizing: border-box;} + /******Responsive*******/ @media only screen and (max-width: 1199px) { /********Default Theme***********/ diff --git a/inc/mep_event_fw_meta.php b/inc/mep_event_fw_meta.php index 6bf821c..06e701c 100644 --- a/inc/mep_event_fw_meta.php +++ b/inc/mep_event_fw_meta.php @@ -173,6 +173,53 @@ function mep_fw_meta_boxs() + $email_body_meta_boxs = array( + 'page_nav' => __('Event List Thumbnail', 'mage-eventpress-gq'), + 'priority' => 10, + 'sections' => array( + 'section_2' => array( + 'title' => __('', 'mage-eventpress-gq'), + 'description' => __('', 'mage-eventpress-gq'), + 'options' => array( + + array( + 'id' => 'mep_event_cc_email_text', + 'title' => __('Confirmation Email Text:','text-domain'), + 'details' => __('','text-domain'), + 'type' => 'wp_editor', + // 'editor_settings'=>array('textarea_name'=>'wp_editor_field', 'editor_height'=>'150px'), + 'placeholder' => __('wp_editor value','text-domain'), + 'default' => '', + ), + ) + ), + + ), + ); + + $email_body_meta_args = array( + 'meta_box_id' => 'mep_event_email_body_meta_boxes', + 'meta_box_title' => __('Event Email Confirmation Text', 'mage-eventpress'), + //'callback' => '_meta_box_callback', + 'screen' => array('mep_events'), + 'context' => 'normal', // 'normal', 'side', and 'advanced' + 'priority' => 'low', // 'high', 'low' + 'callback_args' => array(), + 'nav_position' => 'none', // right, top, left, none + 'item_name' => "MagePeople", + 'item_version' => "2.0", + 'panels' => array( + 'speakers_meta_boxs' => $email_body_meta_boxs + ), + ); + + new AddMetaBox( $email_body_meta_args ); + + + + + + diff --git a/inc/mep_event_meta.php b/inc/mep_event_meta.php index bc1711e..be38549 100644 --- a/inc/mep_event_meta.php +++ b/inc/mep_event_meta.php @@ -13,7 +13,7 @@ function mep_event_meta_box_add(){ add_meta_box( 'mep-event-date', __('Event Date & Time','mage-eventpress'), 'mep_event_date_meta_box_cb', 'mep_events', 'advanced', 'high' ); - add_meta_box( 'mep-event-emails', __('Event Email text','mage-eventpress'), 'mep_event_email_meta_box_cb', 'mep_events', 'normal', 'high' ); + // add_meta_box( 'mep-event-emails', __('Event Email text','mage-eventpress'), 'mep_event_email_meta_box_cb', 'mep_events', 'normal', 'high' ); add_meta_box( 'mep-event-template', __('Template','mage-eventpress'), 'mep_event_template_meta_box_cb', 'mep_events', 'side', 'low' ); @@ -1198,6 +1198,7 @@ function mep_event_date_meta_box_cb($post){ function mep_event_email_meta_box_cb($post){ + $values = get_post_custom( $post->ID ); ?>
@@ -1485,7 +1486,7 @@ if (get_post_type($post_id) == 'mep_events') { $event_end_date = strip_tags($_POST['event_end_date']); $event_end_time = strip_tags($_POST['event_end_time']); // $mep_event_end_date = strip_tags($_POST['mep_event_end_date']); - $mep_event_cc_email_text = $_POST['mep_event_cc_email_text']; + // $mep_event_cc_email_text = $_POST['mep_event_cc_email_text']; $latitude = isset($_POST['latitude']) ? strip_tags($_POST['latitude']) : ""; @@ -1562,7 +1563,7 @@ if (get_post_type($post_id) == 'mep_events') { // update_post_meta( $pid, 'mep_price_label', $mep_price_label); update_post_meta( $pid, '_price', 0); update_post_meta( $pid, '_virtual', 'yes'); - update_post_meta( $pid, 'mep_event_cc_email_text', $mep_event_cc_email_text); + // update_post_meta( $pid, 'mep_event_cc_email_text', $mep_event_cc_email_text); update_post_meta( $pid, '_sku', $pid); if ( !empty( $mdate ) && $mdate != $oldm ) diff --git a/inc/mep_extra_price.php b/inc/mep_extra_price.php index a28aafd..70ec2e6 100644 --- a/inc/mep_extra_price.php +++ b/inc/mep_extra_price.php @@ -179,12 +179,12 @@ function mep_checkout_validation($posted) $items = $woocommerce->cart->get_cart(); foreach ($items as $item => $values) { $event_id = array_key_exists('event_id', $values) ? $values['event_id'] : 0; // $values['event_id']; - if (get_post_type($event_id) == 'mep_events') { + $check_seat_plan = get_post_meta($event_id,'mepsp_event_seat_plan_info',true) ? get_post_meta($event_id,'mepsp_event_seat_plan_info',true) : array(); + + if (get_post_type($event_id) == 'mep_events' && sizeof($check_seat_plan) == 0) { $recurring = get_post_meta($event_id, 'mep_enable_recurring', true) ? get_post_meta($event_id, 'mep_enable_recurring', true) : 'no'; $total_seat = apply_filters('mep_event_total_seat_counts', mep_event_total_seat($event_id, 'total'), $event_id); $total_resv = apply_filters('mep_event_total_resv_seat_count', mep_event_total_seat($event_id, 'resv'), $event_id); - // $total_sold = mep_ticket_sold($event_id); - $ticket_arr = $values['event_ticket_info']; @@ -197,7 +197,6 @@ function mep_checkout_validation($posted) $event_date_txt = get_mep_datetime($ticket['event_date'],'date-time-text'); $total_sold = mep_ticket_type_sold($event_id,$type,$event_date); $available_seat = $total_seat - ($total_resv + $total_sold); - } if($ticket_qty > $available_seat){ diff --git a/inc/mep_functions.php b/inc/mep_functions.php index 2662c71..48e3b7b 100755 --- a/inc/mep_functions.php +++ b/inc/mep_functions.php @@ -505,16 +505,6 @@ function mep_check_attendee_exist_before_create($order_id,$event_id){ } - -// add_action('admin_init','ttttt'); -function ttttt(){ - echo mep_check_attendee_exist_before_create(832,408); - die(); -} - - - - add_action('woocommerce_checkout_order_processed', 'mep_event_booking_management', 10); if (!function_exists('mep_event_booking_management')) { function mep_event_booking_management( $order_id) { @@ -555,14 +545,7 @@ function ttttt(){ if(is_array($user_info_arr) & sizeof($user_info_arr) > 0){ foreach ($user_info_arr as $_user_info) { - mep_attendee_create('user_form',$order_id,$event_id,$_user_info); - - // if($check_before_create == 0){ - // mep_attendee_create('user_form',$order_id,$event_id,$_user_info); - // }else{ - // mep_delete_attandee_of_an_order($order_id,$event_id); - // mep_attendee_create('user_form',$order_id,$event_id,$_user_info); - // } + mep_attendee_create('user_form',$order_id,$event_id,$_user_info); } }else{ @@ -571,14 +554,6 @@ function ttttt(){ mep_attendee_create('billing',$order_id,$event_id,$tinfo); - // if($check_before_create == 0){ - // mep_attendee_create('billing',$order_id,$event_id,$tinfo); - // }else{ - // mep_delete_attandee_of_an_order($order_id,$event_id); - // mep_attendee_create('billing',$order_id,$event_id,$tinfo); - // } - - } } } @@ -607,27 +582,12 @@ function ttttt(){ mep_attendee_create('user_form',$order_id,$event_id,$_user_info); - // if($check_before_create == 0){ - // mep_attendee_create('user_form',$order_id,$event_id,$_user_info); - // }else{ - // mep_delete_attandee_of_an_order($order_id,$event_id); - // mep_attendee_create('user_form',$order_id,$event_id,$_user_info); - // } - } }else{ foreach($event_ticket_info_arr as $tinfo){ for ($x = 1; $x <= $tinfo['ticket_qty']; $x++) { mep_attendee_create('billing',$order_id,$event_id,$tinfo); - // if($check_before_create == 0){ - // mep_attendee_create('billing',$order_id,$event_id,$tinfo); - // }else{ - // mep_delete_attandee_of_an_order($order_id,$event_id); - // mep_attendee_create('billing',$order_id,$event_id,$tinfo); - // } - - } } } @@ -816,7 +776,7 @@ if (!function_exists('change_wc_event_product_status')) { $email = isset($order_meta['_billing_email'][0]) ? $order_meta['_billing_email'][0] : array(); $email_send_status = mep_get_option('mep_email_sending_order_status','email_setting_sec',array('completed' => 'completed')); // mep_email_sending_order_status - + $order_status = $order->get_status(); foreach ( $order->get_items() as $item_id => $item_values ) { @@ -831,54 +791,51 @@ if (!function_exists('change_wc_event_product_status')) { if(in_array('processing',$email_send_status)){ mep_event_confirmation_email_sent($event_id,$email); } - change_attandee_order_status($order_id,'publish','trash','processing'); - change_attandee_order_status($order_id,'publish','publish','processing'); - + change_attandee_order_status($order_id,'publish','publish','processing'); change_extra_service_status($order_id,'publish','trash','processing'); change_extra_service_status($order_id,'publish','publish','processing'); - + do_action('mep_wc_order_status_change',$order_status,$event_id,$order_id); } if($order->has_status( 'pending' )) { change_attandee_order_status($order_id,'publish','trash','pending'); - change_attandee_order_status($order_id,'publish','publish','pending'); - + change_attandee_order_status($order_id,'publish','publish','pending'); change_extra_service_status($order_id,'publish','trash','pending'); change_extra_service_status($order_id,'publish','publish','pending'); + do_action('mep_wc_order_status_change',$order_status,$event_id,$order_id); } if($order->has_status( 'on-hold' )) { change_attandee_order_status($order_id,'publish','trash','on-hold'); - change_attandee_order_status($order_id,'publish','publish','on-hold'); + change_attandee_order_status($order_id,'publish','publish','on-hold'); + do_action('mep_wc_order_status_change',$order_status,$event_id,$order_id); } if($order->has_status( 'completed' ) ) { if(in_array('completed',$email_send_status)){ mep_event_confirmation_email_sent($event_id,$email); } - change_attandee_order_status($order_id,'publish','trash','completed'); - - change_attandee_order_status($order_id,'publish','publish','completed'); - + change_attandee_order_status($order_id,'publish','publish','completed'); change_extra_service_status($order_id,'publish','trash','completed'); change_extra_service_status($order_id,'publish','publish','completed'); + do_action('mep_wc_order_status_change',$order_status,$event_id,$order_id); } if($order->has_status( 'cancelled' ) ) { - change_attandee_order_status($order_id,'trash','publish','cancelled'); - + change_attandee_order_status($order_id,'trash','publish','cancelled'); change_extra_service_status($order_id,'trash','publish','cancelled'); + do_action('mep_wc_order_status_change',$order_status,$event_id,$order_id); } if($order->has_status( 'refunded' ) ) { - change_attandee_order_status($order_id,'trash','publish','refunded'); - + change_attandee_order_status($order_id,'trash','publish','refunded'); change_extra_service_status($order_id,'trash','publish','refunded'); + do_action('mep_wc_order_status_change',$order_status,$event_id,$order_id); } if($order->has_status( 'failed' ) ) { - change_attandee_order_status($order_id,'trash','publish','failed'); - + change_attandee_order_status($order_id,'trash','publish','failed'); change_extra_service_status($order_id,'trash','publish','failed'); + do_action('mep_wc_order_status_change',$order_status,$event_id,$order_id); } } // End of Post Type Check } // End order item foreach @@ -2881,29 +2838,29 @@ function mep_cart_display_user_list($user_info){ foreach ($user_info as $userinf) { ?> " + total + " 0) { require(mep_template_file_path('single/extra_service_list.php')); } $content = ob_get_clean(); $event_meta = get_post_custom($post_id); - echo apply_filters('mage_event_extra_service_list', $content, $post_id, $event_meta); + echo apply_filters('mage_event_extra_service_list', $content, $post_id, $event_meta,$event_date); } } diff --git a/inc/template-prts/event_loop_list.php b/inc/template-prts/event_loop_list.php index 189d662..58250db 100644 --- a/inc/template-prts/event_loop_list.php +++ b/inc/template-prts/event_loop_list.php @@ -5,7 +5,7 @@ if (!defined('ABSPATH')) { add_action('mep_event_list_shortcode', 'mep_display_event_loop_list', 10, 5); if (!function_exists('mep_display_event_loop_list')) { - function mep_display_event_loop_list($event_id, $columnNumber, $style,$width, $unq_id ='') + function mep_display_event_loop_list($event_id, $columnNumber='', $style='',$width='', $unq_id ='') { $now = current_time('Y-m-d H:i:s'); $show_price = mep_get_option('mep_event_price_show', 'general_setting_sec', 'yes'); @@ -34,4 +34,4 @@ if (!function_exists('mep_display_event_loop_list')) { $content = ob_get_clean(); echo apply_filters('mage_event_loop_list_shortcode', $content, $event_id, $style, $unq_id); } -} +} \ No newline at end of file diff --git a/inc/template-prts/single-events.php b/inc/template-prts/single-events.php index 2d5ba4c..850a392 100644 --- a/inc/template-prts/single-events.php +++ b/inc/template-prts/single-events.php @@ -24,7 +24,9 @@ do_action('mep_event_single_page_after_header'); ?>
" + total + ""); jQuery('#rowtotal').val(total); diff --git a/readme.txt b/readme.txt index bfe279c..d59bb93 100644 --- a/readme.txt +++ b/readme.txt @@ -655,4 +655,12 @@ Added Settings to Disbale/Enable Book Now Button Event List Column 1 issue fixed Event List Thumbnail Feature Added -28 Oct 2020* \ No newline at end of file +28 Oct 2020* + += 3.3.8 = +* Update Release: +PHP Errors issue fixed +WP Editor added into Event Confirmation Text +Hook Added + +05 Nov 2020* \ No newline at end of file diff --git a/templates/single/extra_service_list.php b/templates/single/extra_service_list.php index 66c8e39..20e9a7d 100644 --- a/templates/single/extra_service_list.php +++ b/templates/single/extra_service_list.php @@ -6,8 +6,8 @@ -

- ,

+

,

diff --git a/woocommerce-event-press.php b/woocommerce-event-press.php index 62c2527..1dcb4a2 100644 --- a/woocommerce-event-press.php +++ b/woocommerce-event-press.php @@ -3,7 +3,7 @@ * Plugin Name: Woocommerce Events Manager * Plugin URI: http://mage-people.com * Description: A Complete Event Solution for WordPress by MagePeople.. - * Version: 3.3.7 + * Version: 3.3.8 * Author: MagePeople Team * Author URI: http://www.mage-people.com/ * Text Domain: mage-eventpress