version 2.6 with bus fixed
This commit is contained in:
parent
fa00337d83
commit
85d6f1824a
|
@ -916,7 +916,18 @@ label.mep-show {
|
|||
height: auto;
|
||||
margin: 15px 0;
|
||||
}
|
||||
ul#mep_add_calender_links li a {
|
||||
display: block;
|
||||
margin-top: 20px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
ul#mep_add_calender_links {
|
||||
margin: 0 auto;
|
||||
width: 185px;
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
/*Theme 3| Shahan*/
|
||||
.mep-tem3-title-sec {
|
||||
background: #1A84A5;
|
||||
|
|
|
@ -86,11 +86,13 @@ $order = get_post_meta($event, 'mep_events_extra_prices', true);
|
|||
$exs = array();
|
||||
$order_extra_service_arr = mep_get_event_extra_service_items($post_id);
|
||||
if($order_extra_service_arr){
|
||||
if($order){
|
||||
foreach ($order as $_exs) {
|
||||
// $exs[] = $_exs['option_name'];
|
||||
$exs[] = mep_get_extra_service_order_qty($_exs['option_name'], $order_extra_service_arr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return array_merge($row, $crow, $exs);
|
||||
}
|
||||
|
@ -201,11 +203,23 @@ $meta = $_GET['meta_value'];
|
|||
}
|
||||
|
||||
$posts = $wpdb->get_results($query);
|
||||
foreach ( $posts as $i=>$post ) {
|
||||
$status = get_post_status($post->post_id);
|
||||
if($status=='publish'){
|
||||
foreach ( $posts as $i=>$post ) {
|
||||
|
||||
if(isset($_GET['meta_value'])){
|
||||
$post_id = $post->post_id;
|
||||
}else{
|
||||
$post_id = $post->ID;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$status = get_post_status($post_id);
|
||||
|
||||
if($status=='publish'){
|
||||
if(isset($_GET['meta_value'])){
|
||||
|
||||
$event = strip_tags($_GET['meta_value']);
|
||||
$row = mep_get_event_user_fields_data($post_id,$event);
|
||||
}else{
|
||||
|
|
|
@ -273,6 +273,7 @@ if($style=='list'){
|
|||
</div>
|
||||
<?php
|
||||
}
|
||||
wp_reset_postdata();
|
||||
//}
|
||||
if($pagination=='yes'){
|
||||
?>
|
||||
|
@ -532,6 +533,7 @@ if($style=='list'){
|
|||
|
||||
//}
|
||||
}
|
||||
wp_reset_postdata();
|
||||
if($pagination=='yes'){
|
||||
?>
|
||||
|
||||
|
|
15
readme.txt
15
readme.txt
|
@ -1,10 +1,10 @@
|
|||
=== WooCommerce Event Manager ===
|
||||
Contributors: magepeopleteam
|
||||
Contributors: magepeopleteam, aamahin
|
||||
Tags: event, woocomerce events manager, events manager, Wordpress Events plugin, Events plugin, wp events
|
||||
Requires at least: 4.5
|
||||
Stable tag: trunk
|
||||
Version: 2.1.3
|
||||
Tested up to: 5.1.1
|
||||
Tested up to: 5.2
|
||||
Requires PHP: 5.6
|
||||
WC requires at least: 3.0
|
||||
WC tested up to: 3.5.0
|
||||
|
@ -320,11 +320,8 @@ A. you can create support ticket here with problem details with possible screens
|
|||
28 April 2019*
|
||||
|
||||
|
||||
|
||||
*= 2.5.9 =
|
||||
*= 2.6 =
|
||||
*Update Release:
|
||||
==> CSV Export Issue fixed
|
||||
==> Increase Security
|
||||
==> Add Seat status column into event list in Dashboard
|
||||
==> Add Tax, Now tax can be applicable into Event
|
||||
05 May 2019*
|
||||
==> CSV Blank issue fixed
|
||||
==> Multiple Add Calender feature added.
|
||||
21 May 2019*
|
|
@ -225,6 +225,34 @@ update_post_meta( $event_id, $mep_atnd, "a1");
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
add_action('woocommerce_checkout_order_processed', 'mep_event_order_status_make_pending', 10, 1);
|
||||
|
||||
function mep_event_order_status_make_pending($order_id)
|
||||
{
|
||||
// Getting an instance of the order object
|
||||
$order = wc_get_order( $order_id );
|
||||
$order_meta = get_post_meta($order_id);
|
||||
|
||||
# Iterating through each order items (WC_Order_Item_Product objects in WC 3+)
|
||||
foreach ( $order->get_items() as $item_id => $item_values ) {
|
||||
$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');
|
||||
if (get_post_type($event_id) == 'mep_events') {
|
||||
$order_meta_text = "_stock_msg_".$order_id;
|
||||
$order_processing = "pending_".$order_id;
|
||||
|
||||
update_post_meta( $event_id, $order_meta_text, $order_processing);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
add_action('woocommerce_order_status_changed', 'your_function', 10, 4);
|
||||
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;
|
||||
|
@ -242,6 +270,10 @@ global $wpdb;
|
|||
}
|
||||
$ordr_total = $order->get_total();
|
||||
$event_id = mep_event_get_order_meta($item_id,'event_id');
|
||||
|
||||
if (get_post_type($event_id) == 'mep_events') {
|
||||
|
||||
|
||||
$table_name = $wpdb->prefix . 'woocommerce_order_itemmeta';
|
||||
$result = $wpdb->get_results( "SELECT * FROM $table_name WHERE order_item_id=$item_id" );
|
||||
|
||||
|
@ -305,9 +337,6 @@ if($mep_stock_order==$order_id){
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if($order->has_status( 'cancelled' )) {
|
||||
update_post_meta( $event_id,$mep_atnd, "a2");
|
||||
update_post_meta( $event_id, $order_meta_text, $order_cancelled);
|
||||
|
@ -353,12 +382,26 @@ update_post_meta( $event_id, $mep_atnd, "a2");
|
|||
|
||||
if($mep_stock_msg=='processing'){
|
||||
update_post_meta( $event_id, $order_meta_text, $order_completed);
|
||||
}elseif($mep_stock_msg=='pending'){
|
||||
|
||||
update_post_meta( $event_id, 'total_booking', ($mep_total_booking+$item_quantity));
|
||||
update_post_meta( $event_id, $order_meta_text, $order_completed);
|
||||
|
||||
foreach ( $result as $page ){
|
||||
if (strpos($page->meta_key, '_') !== 0) {
|
||||
$order_option_name = $event_id.str_replace(' ', '', mep_get_string_part($page->meta_key,0));
|
||||
$order_option_qty = mep_get_string_part($page->meta_key,1);
|
||||
$tes = get_post_meta($event_id,"mep_xtra_$order_option_name",true);
|
||||
$ntes = ($tes+$order_option_qty);
|
||||
update_post_meta( $event_id, "mep_xtra_$order_option_name",$ntes);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
else{
|
||||
|
||||
|
||||
|
||||
|
||||
// update_post_meta( $event_id, 'total_booking', ($mep_total_booking+$item_quantity));
|
||||
update_post_meta( $event_id, $order_meta_text, $order_completed);
|
||||
|
||||
|
@ -375,7 +418,7 @@ update_post_meta( $event_id, $mep_atnd, "a2");
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -582,16 +625,61 @@ $location = $event_meta['mep_location_venue'][0]." ".$event_meta['mep_street'][0
|
|||
|
||||
|
||||
?>
|
||||
<a href="http://www.google.com/calendar/event?
|
||||
action=TEMPLATE
|
||||
&text=<?php echo $event->post_title; ?>
|
||||
&dates=<?php echo mep_calender_date($event_start); ?>/<?php echo mep_calender_date($event_end); ?>
|
||||
&details=<?php echo substr(strip_tags($event->post_content),0,1000); ?>
|
||||
&location=<?php echo $location; ?>
|
||||
&trp=false
|
||||
&sprop=
|
||||
&sprop=name:"
|
||||
target="_blank" class='mep-add-calender' rel="nofollow"> <i class="fa fa-calendar"></i> <?php echo mep_get_label($pid,'mep_calender_btn_text','Add To Your Calendar'); ?></a>
|
||||
|
||||
<div id="mep_add_calender_button" class='mep-add-calender'><i class="fa fa-calendar"></i>Add Calender</div>
|
||||
|
||||
<ul id="mep_add_calender_links">
|
||||
|
||||
<li><a href="http://www.google.com/calendar/event?
|
||||
action=TEMPLATE&text=<?php echo $event->post_title; ?>&dates=<?php echo mep_calender_date($event_start); ?>/<?php echo mep_calender_date($event_end); ?>&details=<?php echo substr(strip_tags($event->post_content),0,1000); ?>&location=<?php echo $location; ?>&trp=false&sprop=&sprop=name:'" target="_blank" class='mep-add-calender' rel="nofollow">Google</a></li>
|
||||
|
||||
<li><a href="https://calendar.yahoo.com/?v=60&view=d&type=20&title=<?php echo $event->post_title; ?>&st=<?php echo mep_calender_date($event_start); ?>&et=<?php echo mep_calender_date($event_end); ?>&desc=<?php echo substr(strip_tags($event->post_content),0,1000); ?>&in_loc=<?php echo $location; ?>&uid=" target="_blank" class='mep-add-calender' rel="nofollow">Yahoo</a></li>
|
||||
|
||||
|
||||
<li><a href ="https://outlook.live.com/owa/?path=/calendar/view/Month&rru=addevent&dtstart=<?php echo mep_calender_date($event_start); ?>&dtend=<?php echo mep_calender_date($event_end); ?>&subject=<?php echo $event->post_title; ?>" target="_blank" class='mep-add-calender' rel="nofollow">Outlook</a></li>
|
||||
|
||||
<li><a href="https://webapps.genprod.com/wa/cal/download-ics.php?date_end=<?php echo mep_calender_date($event_end); ?>&date_start=<?php echo mep_calender_date($event_start); ?>&summary=<?php echo $event->post_title; ?>&location=<?php echo $location; ?>&description=<?php echo substr(strip_tags($event->post_content),0,1000); ?>">APPlE</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
jQuery("#mep_add_calender_button").click(function () {
|
||||
jQuery("#mep_add_calender_links").toggle()
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
<style type="text/css">
|
||||
#mep_add_calender_links{ display: none;
|
||||
background: transparent;
|
||||
margin-top: -7px;
|
||||
list-style: navajowhite;
|
||||
margin: 0;
|
||||
padding: 0;}
|
||||
/* #mep_add_calender_links li{list-style: none !important; line-height: 0.2px; border:1px solid #d5d5d5; border-radius: 10px; margin-bottom: 5px;}
|
||||
#mep_add_calender_links a{background: none !important; color: #333 !important; line-height: 0.5px !important; padding:10px; margin-bottom: 3px;}
|
||||
#mep_add_calender_links a:hover{color:#ffbe30;}*/
|
||||
#mep_add_calender_button{
|
||||
background: #ffbe30 none repeat scroll 0 0;
|
||||
border: 0 none;
|
||||
border-radius: 50px;
|
||||
color: #ffffff !important;
|
||||
display: inline-flex;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
overflow: hidden;
|
||||
padding: 15px 35px;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
z-index: 1;
|
||||
cursor: pointer;
|
||||
}
|
||||
.mep-default-sidrbar-social .mep-event-meta{text-align: center;}
|
||||
</style>
|
||||
<?php
|
||||
$content = ob_get_clean();
|
||||
echo $content;
|
||||
|
|
Loading…
Reference in New Issue