Skip to content

Commit

Permalink
Merge pull request #1479 from wpeventmanager/3_1_37_1
Browse files Browse the repository at this point in the history
3 1 37 1
  • Loading branch information
krinaydhanani authored Aug 14, 2023
2 parents e52a6b2 + 135d43d commit cda76d7
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 67 deletions.
2 changes: 1 addition & 1 deletion admin/wp-event-manager-writepanels.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function event_listing_fields(){

$current_user = wp_get_current_user();
if(isset($post->ID)) {
$registration = metadata_exists('post', $post->ID, '_event_registration_email') ? get_post_meta($post->ID, '_event_registration_email', true) : $current_user->user_email;
$registration = metadata_exists('post', $post->ID, '_registration') ? get_post_meta($post->ID, '_registration', true) : $current_user->user_email;
$expiry_date = get_post_meta($post->ID, '_event_expiry_date', true);
if($expiry_date) {
$datepicker_date_format = WP_Event_Manager_Date_Time::get_datepicker_format();
Expand Down
9 changes: 7 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Contributors: wpeventmanager,ashokdudhat,krinay
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=55FRYATTFLA5N
Tags: calendar, event, events, organizer, tickets
Requires at least: 4.1
Tested up to: 6.0
Stable tag: 3.1.37
Tested up to: 6.2.2
Stable tag: 3.1.37.1
Requires PHP: 5.6
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Expand Down Expand Up @@ -300,6 +300,11 @@ Our Help Center is the best place to find out more about WP Event Manager. Withi

== Changelog ==

= [3.1.37.1] 14-08-2023 =

Fixed: Plugin is tested with the latest WordPress version and removed compatibility issues with it.
Fixed: The issue related to my registration email/URL is fixed in WP Event Manager.

= [3.1.37] 07-08-2023 =

Fixed: Events of other languages can now be shown using the Polylang plugin
Expand Down
1 change: 0 additions & 1 deletion wp-event-manager-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,6 @@ function get_event_listings_keyword_search($search) {
'_organizer_xing',
'_organizer_pinterest',
'_organizer_instagram',
'_event_registration_email'
);
$searchable_meta_keys = apply_filters('event_listing_searchable_meta_keys', $searchable_meta_keys);
$conditions = array();
Expand Down
2 changes: 1 addition & 1 deletion wp-event-manager-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ function get_event_registration_method($post = null){
}

$method = new stdClass();
$register = $post->_event_registration_email;
$register = $post->_registration;

if(empty($register)) {
$method->type = 'url';
Expand Down
77 changes: 15 additions & 62 deletions wp-event-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
* Author URI: https://www.wp-eventmanager.com
* Text Domain: wp-event-manager
* Domain Path: /languages
* Version: 3.1.37
* Version: 3.1.37.1
* Since: 1.0.0
* Requires WordPress Version at least: 4.1
* Requires WordPress Version at least: 5.4.1
* Copyright: 2019 WP Event Manager
* License: GNU General Public License v3.0
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
Expand Down Expand Up @@ -40,7 +40,7 @@ class WP_Event_Manager {
* @var plugin version
* @since 3.1.33
*/
private static $wpem_verion = '3.1.37';
private static $wpem_verion = '3.1.37.1';

/**
* REST API instance.
Expand Down Expand Up @@ -155,65 +155,18 @@ public function activate() {
WP_Event_Manager_Install::install();
//show notice after activating plugin
update_option('event_manager_rating_showcase_admin_notices_dismiss','0');

// check for old meta keys
// this is for temporary use only to update meta key
// we will remove after some release
if(!get_option('wp_event_manager_update_db')){
$args = array(
'post_type' => 'event_listing',
'meta_key' => '_registration',
'posts_per_page' => -1,
);
$query = new WP_Query($args);

if($query->have_posts()) {
while ($query->have_posts()) {
$query->the_post();
$event_id = get_the_ID();
$regisration_value = get_post_meta($event_id, '_registration', true);
update_post_meta($event_id, '_event_registration_email', $regisration_value);
}

wp_reset_postdata();
}
$args = array(
'post_type' => 'event_listing',
'meta_key' => '_submitting_key',
'posts_per_page' => -1,
);
$query = new WP_Query($args);

if($query->have_posts()) {
while ($query->have_posts()) {
$query->the_post();
$event_id = get_the_ID();
$wpem_unique_key = get_post_meta($event_id, '_submitting_key', true);
update_post_meta($event_id, '_wpem_unique_key', $wpem_unique_key);
}

wp_reset_postdata();
}
$args = array(
'post_type' => 'event_listing',
'meta_key' => '_cancelled',
'posts_per_page' => -1,
);
$query = new WP_Query($args);

if($query->have_posts()) {
while ($query->have_posts()) {
$query->the_post();
$event_id = get_the_ID();
$cancelled_event = get_post_meta($event_id, '_cancelled', true);
update_post_meta($event_id, '_event_cancelled', $cancelled_event);
$featured_event = get_post_meta($event_id, '_featured', true);
update_post_meta($event_id, '_event_featured', $featured_event);
}

wp_reset_postdata();
}
update_option('wp_event_manager_update_db', true);
// 3.1.37.1 change field option name
if(!empty(get_option('event_manager_form_fields', true))) {
$all_fields = get_option('event_manager_form_fields', true);

if(isset($all_fields) && !empty($all_fields) && is_array($all_fields)) {

// 3.1.37.1 change field option name
if(isset($all_fields['event']['event_registration_email']))
unset($all_fields['event']['event_registration_email']);

update_option('event_manager_submit_event_form_fields', array('event' =>$all_fields['event']));
}
}
flush_rewrite_rules();
}
Expand Down

0 comments on commit cda76d7

Please sign in to comment.