WP Events Manager - Version 2.1.7.1

Version Description

  • Fix upgrade process

=

Download this release

Release Info

Developer leehld
Plugin Icon 128x128 WP Events Manager
Version 2.1.7.1
Comparing to
See all releases

Code changes from version 2.1.7 to 2.1.7.1

inc/admin/upgrades/upgrade-2.1.7.1.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit();
5
+ }
6
+
7
+ update_option( 'thimpress-event-version', '2.1.7.1' );
8
+
9
+ /**
10
+ * Update post meta
11
+ */
12
+ $event_args = array(
13
+ 'post_type' => 'tp_event',
14
+ 'posts_per_page' => - 1,
15
+ 'post_status' => 'any'
16
+ );
17
+ $events = new WP_Query( $event_args );
18
+ if ( $events->have_posts() ) {
19
+ while ( $events->have_posts() ) {
20
+ $events->the_post();
21
+
22
+ $status = get_post_status( get_the_ID() );
23
+
24
+ $meta = '';
25
+ switch ( $status ) {
26
+ case 'tp-event-expired':
27
+ $meta = 'expired';
28
+ break;
29
+ case 'tp-event-happenning':
30
+ $meta = 'happening';
31
+ break;
32
+ case 'tp-event-upcoming':
33
+ $meta = 'upcoming';
34
+ break;
35
+ default:
36
+ break;
37
+ }
38
+
39
+ if ( $meta ) {
40
+ update_post_meta( get_the_ID(), 'tp_event_status', $meta );
41
+ wp_update_post( array( 'ID' => get_the_ID(), 'post_status' => 'publish' ) );
42
+ }
43
+
44
+ }
45
+ wp_reset_query();
46
+ }
inc/class-wpems-install.php CHANGED
@@ -19,7 +19,7 @@ class WPEMS_Install {
19
  self::$db_upgrade = array(
20
  '2.0' => WPEMS_INC . 'admin/upgrades/upgrade-2.0.php',
21
  '2.0.8' => WPEMS_INC . 'admin/upgrades/upgrade-2.0.8.php',
22
- '2.1.7' => WPEMS_INC . 'admin/upgrades/upgrade-2.1.7.php'
23
  );
24
  }
25
 
@@ -89,7 +89,7 @@ class WPEMS_Install {
89
  /**
90
  * Upgrade options
91
  */
92
- // self::upgrade_database();
93
  /**
94
  * Create Pages
95
  */
@@ -167,7 +167,7 @@ class WPEMS_Install {
167
 
168
  WPEMS_Install::init();
169
 
170
- add_action( 'admin_init', array( 'WPEMS_Install', 'upgrade_database' ) );
171
 
172
  // active plugin
173
  register_activation_hook( WPEMS_MAIN_FILE, array( 'WPEMS_Install', 'install' ) );
19
  self::$db_upgrade = array(
20
  '2.0' => WPEMS_INC . 'admin/upgrades/upgrade-2.0.php',
21
  '2.0.8' => WPEMS_INC . 'admin/upgrades/upgrade-2.0.8.php',
22
+ '2.1.7.1' => WPEMS_INC . 'admin/upgrades/upgrade-2.1.7.1.php'
23
  );
24
  }
25
 
89
  /**
90
  * Upgrade options
91
  */
92
+ self::upgrade_database();
93
  /**
94
  * Create Pages
95
  */
167
 
168
  WPEMS_Install::init();
169
 
170
+ //add_action( 'admin_init', array( 'WPEMS_Install', 'upgrade_database' ) );
171
 
172
  // active plugin
173
  register_activation_hook( WPEMS_MAIN_FILE, array( 'WPEMS_Install', 'install' ) );
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: thimpress, leehld
3
  Donate link: https://thimpress.com/
4
  Tags: event, event management, events, registration, bookings, tickets, locations, google maps
5
  Requires at least: 4.6
6
- Tested up to: 4.9.5
7
- Stable tag: 2.1.7
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -139,5 +139,8 @@ To stay in touch and update about FundPress's future releases and features, you
139
  = 2.1.7 =
140
  + Update admin sortable events by date
141
 
 
 
 
142
  == Upgrade Notice ==
143
 
3
  Donate link: https://thimpress.com/
4
  Tags: event, event management, events, registration, bookings, tickets, locations, google maps
5
  Requires at least: 4.6
6
+ Tested up to: 4.9.6
7
+ Stable tag: 2.1.7.1
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
139
  = 2.1.7 =
140
  + Update admin sortable events by date
141
 
142
+ = 2.1.7.1 =
143
+ + Fix upgrade process
144
+
145
  == Upgrade Notice ==
146
 
wp-events-manager.php CHANGED
@@ -5,7 +5,7 @@
5
  Plugin URI: http://thimpress.com/
6
  Description: A complete plugin for Events management and online booking system
7
  Author: ThimPress
8
- Version: 2.1.7
9
  Author URI: http://thimpress.com
10
  */
11
 
@@ -43,7 +43,7 @@ if ( ! class_exists( 'WPEMS' ) ) {
43
  $this->set_define( 'WPEMS_INC_URI', WPEMS_URI . 'inc/' );
44
  $this->set_define( 'WPEMS_ASSETS_URI', WPEMS_URI . 'assets/' );
45
  $this->set_define( 'WPEMS_LIB_URI', WPEMS_INC_URI . 'libraries/' );
46
- $this->set_define( 'WPEMS_VER', '2.1.7' );
47
  $this->set_define( 'WPEMS_MAIN_FILE', __FILE__ );
48
  }
49
 
5
  Plugin URI: http://thimpress.com/
6
  Description: A complete plugin for Events management and online booking system
7
  Author: ThimPress
8
+ Version: 2.1.7.1
9
  Author URI: http://thimpress.com
10
  */
11
 
43
  $this->set_define( 'WPEMS_INC_URI', WPEMS_URI . 'inc/' );
44
  $this->set_define( 'WPEMS_ASSETS_URI', WPEMS_URI . 'assets/' );
45
  $this->set_define( 'WPEMS_LIB_URI', WPEMS_INC_URI . 'libraries/' );
46
+ $this->set_define( 'WPEMS_VER', '2.1.7.1' );
47
  $this->set_define( 'WPEMS_MAIN_FILE', __FILE__ );
48
  }
49