Restaurant Reservations - Version 2.0.1

Version Description

(2019-10-28) = - Fixing an error being thrown if you tried to update while also having the email templates add-on activated

Download this release

Release Info

Developer Rustaurius
Plugin Icon 128x128 Restaurant Reservations
Version 2.0.1
Comparing to
See all releases

Code changes from version 2.0.0 to 2.0.1

Files changed (2) hide show
  1. readme.txt +3 -0
  2. restaurant-reservations.php +35 -6
readme.txt CHANGED
@@ -175,6 +175,9 @@ Find answers to even more questions in the [FAQ](http://doc.fivestarplugins.com/
175
176
== Changelog ==
177
178
= 2.0.0 (2019-10-28) =
179
- <strong>This is a big update with many new features, corrections, revised admin styling, etc., so please take caution and test before updating on a live site (or wait a few days before updating in case some minor corrective updates need to be put out)</strong>
180
- The Options pages have a brand new and easy-to-use design, to go hand in hand with the many, many new options!
175
176
== Changelog ==
177
178
+ = 2.0.1 (2019-10-28) =
179
+ - Fixing an error being thrown if you tried to update while also having the email templates add-on activated
180
+
181
= 2.0.0 (2019-10-28) =
182
- <strong>This is a big update with many new features, corrections, revised admin styling, etc., so please take caution and test before updating on a live site (or wait a few days before updating in case some minor corrective updates need to be put out)</strong>
183
- The Options pages have a brand new and easy-to-use design, to go hand in hand with the many, many new options!
restaurant-reservations.php CHANGED
@@ -3,7 +3,7 @@
3
* Plugin Name: Five Star Restaurant Reservations
4
* Plugin URI: http://www.fivestarplugins.com/plugins/five-star-restaurant-reservations/
5
* Description: Restaurant reservations made easy. Accept bookings online. Quickly confirm or reject reservations, send email notifications, set booking times and more.
6
- * Version: 2.0.0
7
* Author: FiveStarPlugins
8
* Author URI: https://profiles.wordpress.org/fivestarplugins/
9
* Text Domain: restaurant-reservations
@@ -60,6 +60,11 @@ class rtbInit {
60
// Add custom roles and capabilities
61
add_action( 'init', array( $this, 'add_roles' ) );
62
63
// Load custom post types
64
require_once( RTB_PLUGIN_DIR . '/includes/CustomPostTypes.class.php' );
65
$this->cpts = new rtbCustomPostTypes();
@@ -144,10 +149,6 @@ class rtbInit {
144
// Add links to plugin listing
145
add_filter('plugin_action_links', array( $this, 'plugin_action_links' ), 10, 2);
146
147
- // Load the plugin permissions
148
- require_once( RTB_PLUGIN_DIR . '/includes/Permissions.class.php' );
149
- $this->permissions = new rtbPermissions();
150
-
151
// Load integrations with other plugins
152
require_once( RTB_PLUGIN_DIR . '/includes/integrations/business-profile.php' );
153
require_once( RTB_PLUGIN_DIR . '/includes/integrations/woocommerce.php' );
@@ -270,7 +271,7 @@ class rtbInit {
270
if ( get_option( 'rtb-pro-was-active' ) > time() - 7*24*3600 ) {
271
echo "<div class='rtb-deactivate-pro'>";
272
echo "<p>We've combined the code base for the free and pro versions into one plugin file for easier management.</p>";
273
- echo "<p>You still have access to the premium features you purchased.</p>";
274
echo "</div>";
275
}
276
@@ -407,6 +408,34 @@ class rtbInit {
407
$this->cron->unschedule_events();
408
}
409
410
}
411
} // endif;
412
3
* Plugin Name: Five Star Restaurant Reservations
4
* Plugin URI: http://www.fivestarplugins.com/plugins/five-star-restaurant-reservations/
5
* Description: Restaurant reservations made easy. Accept bookings online. Quickly confirm or reject reservations, send email notifications, set booking times and more.
6
+ * Version: 2.0.1
7
* Author: FiveStarPlugins
8
* Author URI: https://profiles.wordpress.org/fivestarplugins/
9
* Text Domain: restaurant-reservations
60
// Add custom roles and capabilities
61
add_action( 'init', array( $this, 'add_roles' ) );
62
63
+ // Load the plugin permissions
64
+ require_once( RTB_PLUGIN_DIR . '/includes/Permissions.class.php' );
65
+ $this->permissions = new rtbPermissions();
66
+ $this->handle_combination();
67
+
68
// Load custom post types
69
require_once( RTB_PLUGIN_DIR . '/includes/CustomPostTypes.class.php' );
70
$this->cpts = new rtbCustomPostTypes();
149
// Add links to plugin listing
150
add_filter('plugin_action_links', array( $this, 'plugin_action_links' ), 10, 2);
151
152
// Load integrations with other plugins
153
require_once( RTB_PLUGIN_DIR . '/includes/integrations/business-profile.php' );
154
require_once( RTB_PLUGIN_DIR . '/includes/integrations/woocommerce.php' );
271
if ( get_option( 'rtb-pro-was-active' ) > time() - 7*24*3600 ) {
272
echo "<div class='rtb-deactivate-pro'>";
273
echo "<p>We've combined the code base for the free and pro versions into one plugin file for easier management.</p>";
274
+ echo "<p>You still have access to the premium features you purchased, and you can read more about why we've combined them <a href='http://www.fivestarplugins.com/2019/10/21/five-star-restaurant-reservations-new-features-more-options/'>on our blog</a></p>";
275
echo "</div>";
276
}
277
408
$this->cron->unschedule_events();
409
}
410
411
+ /**
412
+ * Handle the codebase combination
413
+ * @since 2.0
414
+ */
415
+ public function handle_combination() {
416
+ include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
417
+
418
+ if ( is_plugin_active( "custom-fields-for-rtb/custom-fields-for-rtb.php" ) ) {
419
+ update_option('rtb-pro-was-active', time());
420
+ deactivate_plugins("custom-fields-for-rtb/custom-fields-for-rtb.php");
421
+ }
422
+
423
+ if ( is_plugin_active( "email-templates-for-rtb/email-templates-for-rtb.php" ) ) {
424
+ update_option('rtb-pro-was-active', time());
425
+ deactivate_plugins("email-templates-for-rtb/email-templates-for-rtb.php");
426
+ }
427
+
428
+ if ( is_plugin_active( "export-bookings-for-rtb/export-bookings-for-rtb.php" ) ) {
429
+ update_option('rtb-pro-was-active', time());
430
+ deactivate_plugins("export-bookings-for-rtb/export-bookings-for-rtb.php");
431
+ }
432
+
433
+ if ( is_plugin_active( "mailchimp-for-rtb/mailchimp-for-rtb.php" ) ) {
434
+ update_option('rtb-pro-was-active', time());
435
+ deactivate_plugins("mailchimp-for-rtb/mailchimp-for-rtb.php");
436
+ }
437
+ }
438
+
439
}
440
} // endif;
441