version 3.5.6 released

This commit is contained in:
magepeopleteam 2021-12-28 06:27:55 +00:00
parent 087047002a
commit e65a443557
5 changed files with 59 additions and 18 deletions

View File

@ -2607,14 +2607,17 @@ if (!function_exists('mep_on_post_publish')) {
'post_type' => 'product' //'post',page' or use a custom post type if you want to 'post_type' => 'product' //'post',page' or use a custom post type if you want to
); );
//SAVE THE POST //SAVE THE POST
$pid = wp_insert_post($new_post); $pid = wp_insert_post($new_post);
$product_type = mep_get_option('mep_event_product_type', 'general_setting_sec', 'yes'); $product_type = mep_get_option('mep_event_product_type', 'general_setting_sec', 'yes');
$_tax_status = 'none';
update_post_meta($pid, '_tax_status', $_tax_status);
update_post_meta($post_id, '_tax_status', $_tax_status);
update_post_meta($post_id, 'link_wc_product', $pid); update_post_meta($post_id, 'link_wc_product', $pid);
update_post_meta($pid, 'link_mep_event', $post_id); update_post_meta($pid, 'link_mep_event', $post_id);
update_post_meta($pid, '_price', 0.01); update_post_meta($pid, '_price', 0.01);
update_post_meta($pid, '_sold_individually', 'yes'); update_post_meta($pid, '_sold_individually', 'yes');
update_post_meta($pid, '_virtual', $product_type); update_post_meta($pid, '_virtual', $product_type);
$terms = array('exclude-from-catalog', 'exclude-from-search'); $terms = array('exclude-from-catalog', 'exclude-from-search');
wp_set_object_terms($pid, $terms, 'product_visibility'); wp_set_object_terms($pid, $terms, 'product_visibility');
wp_set_post_terms($pid, $product_cat_ids, 'product_cat'); wp_set_post_terms($pid, $product_cat_ids, 'product_cat');
update_post_meta($post_id, 'check_if_run_once', true); update_post_meta($post_id, 'check_if_run_once', true);
@ -3342,7 +3345,6 @@ function mep_get_reg_label($event_id, $name = '') {
} elseif ($name == 'Website') { } elseif ($name == 'Website') {
return get_post_meta($event_id, 'mep_website_label', true) ? get_post_meta($event_id, 'mep_website_label', true) : esc_html__('Website', 'mage-eventpress'); return get_post_meta($event_id, 'mep_website_label', true) ? get_post_meta($event_id, 'mep_website_label', true) : esc_html__('Website', 'mage-eventpress');
} elseif ($name == 'Vegetarian') { } elseif ($name == 'Vegetarian') {
return get_post_meta($event_id, 'mep_veg_label', true) ? get_post_meta($event_id, 'mep_veg_label', true) : esc_html__('Vegetarian', 'mage-eventpress'); return get_post_meta($event_id, 'mep_veg_label', true) ? get_post_meta($event_id, 'mep_veg_label', true) : esc_html__('Vegetarian', 'mage-eventpress');
} else { } else {
return null; return null;
@ -4703,3 +4705,43 @@ if (!class_exists('MPWEM_Helper')) {
// Function for create hidden product for bus
if (!function_exists('mep_create_hidden_event_product')) {
function mep_create_hidden_event_product($post_id, $title)
{
$new_post = array(
'post_title' => $title,
'post_content' => '',
'post_name' => uniqid(),
'post_category' => array(),
'tags_input' => array(),
'post_status' => 'publish',
'post_type' => 'product'
);
$_tax_status = 'none';
$pid = wp_insert_post($new_post);
update_post_meta($post_id, 'link_wc_product', $pid);
update_post_meta($pid, 'link_mep_event', $post_id);
update_post_meta($pid, '_price', 0.01);
update_post_meta($pid, '_tax_status', $_tax_status);
update_post_meta($pid, '_sold_individually', 'yes');
update_post_meta($pid, '_virtual', 'yes');
$terms = array('exclude-from-catalog', 'exclude-from-search');
wp_set_object_terms($pid, $terms, 'product_visibility');
update_post_meta($post_id, 'check_if_run_once', true);
}
}
// Flash Permalink only Once
if (!function_exists('mep_flash_permalink_once')) {
function mep_flash_permalink_once()
{
if (get_option('mep_flash_event_permalink') != 'completed') {
global $wp_rewrite;
$wp_rewrite->flush_rules();
update_option('mep_flash_event_permalink', 'completed');
}
}
}
add_action('admin_init', 'mep_flash_permalink_once');

View File

@ -46,16 +46,7 @@ function mep_check_attendee_exists($event_id, $order_id, $name = null, $email =
return $loop->post_count; return $loop->post_count;
} }
// Flash Permalink only Once
function mep_flash_permalink_once()
{
if (get_option('mep_flash_event_permalink') != 'completed') {
global $wp_rewrite;
$wp_rewrite->flush_rules();
update_option('mep_flash_event_permalink', 'completed');
}
}
add_action('admin_init', 'mep_flash_permalink_once');

View File

@ -801,4 +801,12 @@ Translation Issue fixed
Event List Image Quality issue fixed Event List Image Quality issue fixed
Style Issue fixed Style Issue fixed
Bug Fixed Bug Fixed
24 Nov 2021* 24 Nov 2021*
= 3.5.6=
* Update Release:
Event Duplicate Warning issue fixed
Style Issue fixed
Bug Fixed
more....
28 Dec 2021*

View File

@ -93,4 +93,4 @@ $event_label = mep_get_option('mep_event_label', 'general_setting
</h4> </h4>
<?php do_action('mep_event_map',get_the_id()); ?> <?php do_action('mep_event_map',get_the_id()); ?>
</div> </div>
</div> </div>

View File

@ -3,7 +3,7 @@
* Plugin Name: Event Manager and Tickets Selling Plugin for WooCommerce * Plugin Name: Event Manager and Tickets Selling Plugin for WooCommerce
* Plugin URI: http://mage-people.com * Plugin URI: http://mage-people.com
* Description: A Complete Event Solution for WordPress by MagePeople.. * Description: A Complete Event Solution for WordPress by MagePeople..
* Version: 3.5.5 * Version: 3.5.6
* Author: MagePeople Team * Author: MagePeople Team
* Author URI: http://www.mage-people.com/ * Author URI: http://www.mage-people.com/
* Text Domain: mage-eventpress * Text Domain: mage-eventpress
@ -46,4 +46,4 @@ if (is_plugin_active('woocommerce/woocommerce.php')) {
); );
} }
add_action('admin_notices', 'mep_admin_notice_wc_not_active'); add_action('admin_notices', 'mep_admin_notice_wc_not_active');
} }