v 3.9.1 release
This commit is contained in:
parent
217b842e3c
commit
e7737b49ed
|
@ -6,6 +6,13 @@ if (!defined('ABSPATH')) {
|
|||
appsero_init_tracker_mage_eventpress();
|
||||
|
||||
|
||||
function mep_add_event_into_feed_request($qv) {
|
||||
if (isset($qv['feed']) && !isset($qv['post_type']))
|
||||
$qv['post_type'] = array('mep_events');
|
||||
return $qv;
|
||||
}
|
||||
add_filter('request', 'mep_add_event_into_feed_request');
|
||||
|
||||
// Language Load
|
||||
add_action('init', 'mep_language_load');
|
||||
if (!function_exists('mep_language_load')) {
|
||||
|
@ -762,7 +769,9 @@ function mep_beta_disable_add_to_cart_if_product_is_in_cart($is_purchasable, $pr
|
|||
if(!class_exists( 'Afterpay_Plugin' )){
|
||||
if(!class_exists( 'WC_Subscriptions' )){
|
||||
if ( !is_plugin_active( 'woo-juno/main.php' )){
|
||||
$woocommerce->cart->empty_cart();
|
||||
if ( ! class_exists( 'WC_Saferpay' ) ) {
|
||||
$woocommerce->cart->empty_cart();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1930,8 +1939,7 @@ if (!function_exists('mep_event_list_price')) {
|
|||
$price_arr[] = array_key_exists('option_price_t',$ticket) ? $ticket['option_price_t'] : null;
|
||||
}
|
||||
}
|
||||
|
||||
return $type == 'price' && sizeof($price_arr) > 0 ? wc_price(min($price_arr)) : count($price_arr);
|
||||
return $type == 'price' && sizeof($price_arr) > 0 ? wc_price(mep_get_price_including_tax($pid,min($price_arr))) : count($price_arr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2540,6 +2548,9 @@ if (!function_exists('mep_get_term_as_class')) {
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (!function_exists('mep_ticket_type_sold')) {
|
||||
function mep_ticket_type_sold($event_id, $type = '', $date = '') {
|
||||
$type = !empty($type) ? $type : '';
|
||||
|
@ -2548,11 +2559,24 @@ if (!function_exists('mep_ticket_type_sold')) {
|
|||
$_order_status = !empty($_user_set_status) ? $_user_set_status : array('processing','completed');
|
||||
$order_status = array_values($_order_status);
|
||||
|
||||
$order_status_filter = array(
|
||||
'key' => 'ea_order_status',
|
||||
'value' => $order_status,
|
||||
'compare' => 'OR'
|
||||
);
|
||||
// $order_status_filter = array(
|
||||
// 'key' => 'ea_order_status',
|
||||
// 'value' => $order_status,
|
||||
// 'compare' => 'OR'
|
||||
// );
|
||||
|
||||
|
||||
if ( count( $order_status ) > 1 ) { // check if more then one tag
|
||||
$order_status_filter['relation'] = 'OR';
|
||||
|
||||
foreach($order_status as $tag) { // create a LIKE-comparison for every single tag
|
||||
$order_status_filter[] = array( 'key' => 'ea_order_status', 'value' => $tag, 'compare' => '=' );
|
||||
}
|
||||
|
||||
} else { // if only one tag then proceed with simple query
|
||||
$order_status_filter[] = array( 'key' => 'ea_order_status', 'value' => $order_status[0], 'compare' => '=' );
|
||||
}
|
||||
|
||||
|
||||
$type_filter = !empty($type) ? array(
|
||||
'key' => 'ea_ticket_type',
|
||||
|
@ -2585,7 +2609,8 @@ if (!function_exists('mep_ticket_type_sold')) {
|
|||
)
|
||||
);
|
||||
$loop = new WP_Query($args);
|
||||
|
||||
// echo '<pre>'; print_r($loop); echo '</pre>';
|
||||
// // die();
|
||||
return $loop->post_count;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Plugin Name: Event Manager and Tickets Selling Plugin for WooCommerce
|
||||
* Plugin URI: http://mage-people.com
|
||||
* Description: A Complete Event Solution for WordPress by MagePeople..
|
||||
* Version: 3.9.0
|
||||
* Version: 3.9.1
|
||||
* Author: MagePeople Team
|
||||
* Author URI: http://www.mage-people.com/
|
||||
* Text Domain: mage-eventpress
|
||||
|
|
Loading…
Reference in New Issue