version 2.5.6 released

This commit is contained in:
magepeopleteam 2019-04-17 11:54:24 +00:00
parent aa5e49e043
commit 4dc1df03ee
5 changed files with 64 additions and 94 deletions

View File

@ -42,8 +42,6 @@ function mep_addon_list_sec(){
left: 0;
right: auto;
}
.addon_list_sec .mep_addon_list li h3 {
margin-top: 10px;
}
@ -65,75 +63,10 @@ function mep_addon_list_sec(){
}
</style>
<?php
$addon_list = array(
array(
'name' => 'WooCommerce Event Booking Manager PRO',
'price' => '$30',
'banner' => 'https://mage-people.com/wp-content/uploads/2018/06/banner_EVENT.png',
'url' => 'https://mage-people.com/product/mage-woo-event-booking-manager-pro/',
'excerpt' => 'A Complete Event Solution forWooCommerce with Lots of Premium features Powered by WordPress',
'btn_txt' => 'Get Now'
),
array(
'name' => 'WooCommerce Event Coupon Code Addon',
'price' => '$10',
'banner' => 'https://mage-people.com/wp-content/uploads/2019/02/banner_EVENT_Coupon.png',
'url' => 'https://mage-people.com/product/woocommerce-event-coupon-code-addon/',
'excerpt' => 'WooCommerce Event Manager is a great solution managing events and this is a simple solution for managing coupon code for specific events to specific customer',
'btn_txt' => 'Get Now'
),
array(
'name' => 'WooCommerce Event Waitlist Addon',
'price' => '$10',
'banner' => 'https://mage-people.com/wp-content/uploads/2019/02/banner_WaitList.png',
'url' => 'https://mage-people.com/product/woocommerce-event-waitlist-addon/',
'excerpt' => 'WooCommerce Event Waitlist Addon, It will work with Event plugin, Once event ticket available quantity will finish, Waitlist plugin will be activated and the subscriber can join the waitlist, admin can send email to the user for next free slot.',
'btn_txt' => 'Get Now'
),
array(
'name' => 'WooCommerce Event Calendar Addon',
'price' => '$20',
'banner' => 'https://mage-people.com/wp-content/uploads/2019/03/banner_EVENT_calender-800x473.png',
'url' => 'https://mage-people.com/product/woocommerce-event-calendar-addon/',
'excerpt' => 'Showcase your events into an awesome calendar by this Addon. Just installed this plugin and use the shortcode to show the calendar anywhere in your website.',
'btn_txt' => 'Get Now'
),
array(
'name' => 'WooCommerce Event: Book an Event From Dashboard',
'price' => '$20',
'banner' => 'https://mage-people.com/wp-content/uploads/2019/03/banner_EVENT_order_dashboard-800x473.png',
'url' => 'https://mage-people.com/product/woocommerce-event-book-an-event-from-dashboard/',
'excerpt' => 'This addon will add a new feature so you can book any event from the WordPress Dashboard.',
'btn_txt' => 'Get Now'
),
array(
'name' => 'Woocommerce Event: User Registration Form Position',
'price' => '$10',
'banner' => 'https://mage-people.com/wp-content/uploads/2019/03/banner_EVENT_user_reg-800x473.png',
'url' => 'https://mage-people.com/product/woocommerce-event-user-registration-form-position/',
'excerpt' => 'This addon adds this feature, You can choose where the event Attendee/user form will display into the event details page or into the checkout page',
'btn_txt' => 'Get Now'
),
array(
'name' => 'Woocommerce Event: Duplicator Addon',
'price' => '$5',
'banner' => 'https://mage-people.com/wp-content/uploads/2019/03/banner_EVENT_duplicator-1-800x473.png',
'url' => 'https://mage-people.com/product/woocommerce-event-duplicator-addon/',
'excerpt' => 'This addon will add Duplicator feature into Woocommerce Event Plugin. So you can easily duplicate any event and re-use.',
'btn_txt' => 'Get Now'
)
);
$json = file_get_contents('http://vaincode.com/update/addon-list.json');
$obj = json_decode($json, true);
echo '<div class="addon_list_sec"><ul class="mep_addon_list">';
foreach ($addon_list as $list) {
foreach ($obj as $list) {
echo '<li>';
echo '<img src='.$list['banner'].'>';
echo '<h3>'.$list['name'].'</h3>';

View File

@ -37,6 +37,7 @@ function mep_event_meta_box_add(){
function mep_event_change_reg_status_cb($post){
$values = get_post_custom( $post->ID );
wp_nonce_field( 'mep_event_reg_btn_nonce', 'mep_event_reg_btn_nonce' );
?>
<div class='sec'>
<label for="mep_ev_20988"> <?php _e('Registration On/Off:','mage-eventpress'); ?>
@ -51,6 +52,7 @@ function mep_event_change_reg_status_cb($post){
function mep_event_available_seat_cb($post){
$values = get_post_custom( $post->ID );
wp_nonce_field( 'mep_event_reg_btn_nonce', 'mep_event_reg_btn_nonce' );
?>
<div class='sec'>
<label for="mep_ev_209882"> <?php _e('Show Available Seat?','mage-eventpress'); ?>
@ -66,6 +68,21 @@ function mep_event_available_seat_cb($post){
add_action('save_post','mep_reg_status_meta_save');
function mep_reg_status_meta_save($post_id){
global $wpdb;
if ( ! isset( $_POST['mep_event_reg_btn_nonce'] ) ||
! wp_verify_nonce( $_POST['mep_event_reg_btn_nonce'], 'mep_event_reg_btn_nonce' ) )
return;
if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE)
return;
if (!current_user_can('edit_post', $post_id))
return;
if (get_post_type($post_id) == 'mep_events') {
if(isset($_POST['mep_reg_status'])){
$mep_reg_status = strip_tags($_POST['mep_reg_status']);
}else{
@ -83,7 +100,7 @@ $update_ava_seat = update_post_meta( $post_id, 'mep_available_seat', $mep_ava
$update_seat = update_post_meta( $post_id, 'mep_reg_status', $mep_reg_status);
}
}
@ -470,6 +487,10 @@ function mep_event_faq_save($post_id) {
if (!current_user_can('edit_post', $post_id))
return;
if (get_post_type($post_id) == 'mep_events') {
$old = get_post_meta($post_id, 'mep_event_faq', true);
$new = array();
// $options = hhs_get_sample_options();
@ -498,8 +519,7 @@ function mep_event_faq_save($post_id) {
delete_post_meta( $post_id, 'mep_event_faq', $old );
}
}
@ -597,6 +617,10 @@ function mep_event_day_data_save($post_id) {
if (!current_user_can('edit_post', $post_id))
return;
if (get_post_type($post_id) == 'mep_events') {
$old = get_post_meta($post_id, 'mep_event_day', true);
$new = array();
// $options = hhs_get_sample_options();
@ -625,8 +649,7 @@ function mep_event_day_data_save($post_id) {
delete_post_meta( $post_id, 'mep_event_day', $old );
}
}
@ -926,6 +949,9 @@ function mep_events_ticket_type_save($post_id) {
if (!current_user_can('edit_post', $post_id))
return;
if (get_post_type($post_id) == 'mep_events') {
$old = get_post_meta($post_id, 'mep_event_ticket_type', true);
$new = array();
// $options = hhs_get_sample_options();
@ -981,6 +1007,7 @@ function mep_events_ticket_type_save($post_id) {
elseif ( empty($new) && $old )
delete_post_meta( $post_id, 'mep_event_ticket_type', $old );
}
}
@ -1006,6 +1033,9 @@ function mep_events_repeatable_meta_box_save($post_id) {
if (!current_user_can('edit_post', $post_id))
return;
if (get_post_type($post_id) == 'mep_events') {
$old = get_post_meta($post_id, 'mep_events_extra_prices', true);
$new = array();
// $options = hhs_get_sample_options();
@ -1057,7 +1087,7 @@ function mep_events_repeatable_meta_box_save($post_id) {
delete_post_meta( $post_id, 'mep_events_extra_prices', $old );
}
}
@ -1078,6 +1108,7 @@ if($post){
$pid='';
}
if (get_post_type($post_id) == 'mep_events') {
$oldm = get_post_meta($post_id, 'mep_event_more_date', true);
$mdate = array();
@ -1224,7 +1255,7 @@ add_action( 'add_meta_boxes', 'mep_meta_box_add' );
function mep_meta_box_add(){
add_meta_box( 'my-meta-box-id', 'Information', 'mep_meta_box_cb', 'mep_events_attendees', 'normal', 'high' );
}
}
function mep_meta_box_cb($post){
$values = get_post_custom( $post->ID );

View File

@ -115,14 +115,14 @@ if($mep_events_extra_prices){
foreach ( $mep_events_extra_prices as $field ) {
if($field['option_qty']>0){
?>
<li><?php echo esc_attr( $field['option_name'] ); ?> x <?php echo esc_attr( $field['option_qty'] ); ?>: <?php echo get_woocommerce_currency_symbol().($field['option_qty'] *$field['option_price'] ); ?> </li>
<li><?php echo esc_attr( $field['option_name'] ); ?> x <?php echo esc_attr( $field['option_qty'] ); ?>: <?php echo wc_price($field['option_qty'] *$field['option_price'] ); ?> </li>
<?php
}
}
}
if(array_key_exists('event_ticket_type', $cart_item)){
// if($cart_item['event_ticket_type']){
echo "<li> Ticket: ".$cart_item['event_ticket_type']." x ".$cart_item['event_ticket_qty'].": ".get_woocommerce_currency_symbol().$cart_item['event_ticket_price']."</li>";
echo "<li> Ticket: ".$cart_item['event_ticket_type']." x ".$cart_item['event_ticket_qty'].": ".wc_price($cart_item['event_ticket_price'])."</li>";
}
echo "</ul>";
}
@ -177,7 +177,7 @@ if (is_array($mep_events_extra_prices) || is_object($mep_events_extra_prices)){
foreach ( $mep_events_extra_prices as $field ) {
if($field['option_qty']>0){
$item->add_meta_data(esc_attr( $field['option_name'] )." x ".$field['option_qty'], get_woocommerce_currency_symbol().($field['option_qty'] *$field['option_price'] ) );
$item->add_meta_data(esc_attr( $field['option_name'] )." x ".$field['option_qty'], wc_price($field['option_qty'] *$field['option_price'] ) );
$opt_name = $product_id.str_replace(' ', '', $field['option_name']);

View File

@ -245,7 +245,7 @@ if($style=='list'){
<h5>
<?php echo mep_get_option('mep_organized_by_text', 'label_setting_sec') ? mep_get_option('mep_organized_by_text', 'label_setting_sec') : _e('Organized By:','mage-eventpress'); ?>
</h5>
<h6><?php echo $author_terms[0]->name; ?></h6>
<h6><?php if($author_terms){ echo $author_terms[0]->name; } ?></h6>
</div>
</li>
<li>
@ -522,6 +522,14 @@ if($style=='list'){
</div>
</div>
<?php
//}
}
if($pagination=='yes'){

View File

@ -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: 2.5.5
* Version: 2.5.6
* Author: MagePeople Team
* Author URI: http://www.mage-people.com/
* Text Domain: mage-eventpress
@ -214,13 +214,6 @@ update_post_meta( $event_id, $mep_atnd, "a1");
}
add_action('woocommerce_order_status_changed', 'mep_event_seat_management', 10, 4);
function mep_event_seat_management( $order_id, $from_status, $to_status, $order ) {
global $wpdb;
@ -236,7 +229,7 @@ global $wpdb;
$item_quantity = $item_values->get_quantity();
$item_id = $item_id;
}
$ordr_total = $order->get_total();
$event_id = mep_event_get_order_meta($item_id,'event_id');
$table_name = $wpdb->prefix . 'woocommerce_order_itemmeta';
$result = $wpdb->get_results( "SELECT * FROM $table_name WHERE order_item_id=$item_id" );
@ -341,6 +334,9 @@ update_post_meta( $event_id, $mep_atnd, "a2");
$mep_stock_msg = mep_get_order_info(get_post_meta($event_id,$order_meta_text, true),0);
$mep_stock_order = mep_get_order_info(get_post_meta($event_id,$order_meta_text, true),1);
mep_event_confirmation_email_sent($event_id,$email);
if($ordr_total==0){
update_post_meta( $event_id, 'total_booking', ($mep_total_booking+$item_quantity));
}
if($mep_stock_order==$order_id){
@ -348,6 +344,10 @@ update_post_meta( $event_id, $mep_atnd, "a2");
update_post_meta( $event_id, $order_meta_text, $order_completed);
}
else{
// update_post_meta( $event_id, 'total_booking', ($mep_total_booking+$item_quantity));
update_post_meta( $event_id, $order_meta_text, $order_completed);
@ -363,8 +363,6 @@ update_post_meta( $event_id, $mep_atnd, "a2");
}
}
}
}
@ -836,7 +834,7 @@ global $post;
// }
if($mep_event_ticket_type){
$gn_price = $cur.$mep_event_ticket_type[0]['option_price_t'];
$gn_price = wc_price($mep_event_ticket_type[0]['option_price_t']);
}
return $gn_price;
@ -1093,7 +1091,7 @@ function mep_save_attendee_info_into_cart($product_id){
$mep_user_cfd = "";
}
$count_user = count($mep_user_name);
if($mep_user_name){ $count_user = count($mep_user_name); } else{ $count_user = 0; }
for ( $iu = 0; $iu < $count_user; $iu++ ) {