Restaurant Reservations - Version 2.0.9

Version Description

(2019-11-04) = - Fixes the issue with exceptions when max reservations wasn't enabled - Fixes the ajaxurl JS error

Download this release

Release Info

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

Code changes from version 2.0.8 to 2.0.9

assets/js/booking-form.js CHANGED
@@ -182,8 +182,8 @@ jQuery(document).ready(function ($) {
182
183
var selected_date = new Date( rtb_booking_form.datepicker.get( 'select', 'yyyy/mm/dd' ) ),
184
selected_date_year = selected_date.getFullYear(),
185
- selected_date_month = ('0' + (selected_date.getMonth()+1)).slice(-2),
186
- selected_date_date = ('0' + selected_date.getDate()).slice(-2),
187
current_date = new Date();
188
189
// Declaring the first element true inverts the timepicker settings. All
@@ -193,6 +193,8 @@ jQuery(document).ready(function ($) {
193
var valid_times = [ rtb_booking_form.get_outer_time_range() ];
194
195
if ( rtb_pickadate.enable_max_reservations ) {
196
197
var data = 'year=' + selected_date_year + '&month=' + selected_date_month + '&day=' + selected_date_date + '&action=rtb_get_available_time_slots';
198
jQuery.post( ajaxurl, data, function( response ) {
182
183
var selected_date = new Date( rtb_booking_form.datepicker.get( 'select', 'yyyy/mm/dd' ) ),
184
selected_date_year = selected_date.getFullYear(),
185
+ selected_date_month = selected_date.getMonth(),
186
+ selected_date_date = selected_date.getDate(),
187
current_date = new Date();
188
189
// Declaring the first element true inverts the timepicker settings. All
193
var valid_times = [ rtb_booking_form.get_outer_time_range() ];
194
195
if ( rtb_pickadate.enable_max_reservations ) {
196
+ selected_date_month = ('0' + (selected_date_month + 1)).slice(-2);
197
+ selected_date_date = ('0' + selected_date_date).slice(-2);
198
199
var data = 'year=' + selected_date_year + '&month=' + selected_date_month + '&day=' + selected_date_date + '&action=rtb_get_available_time_slots';
200
jQuery.post( ajaxurl, data, function( response ) {
includes/Permissions.class.php CHANGED
@@ -30,6 +30,8 @@ class rtbPermissions {
30
public function set_permissions() {
31
global $rtb_controller;
32
33
$cffrtb = $rtb_controller->settings->get_setting( 'license-cffrtb' );
34
$ebfrtb = $rtb_controller->settings->get_setting( 'license-ebfrtb' );
35
$etfrtb = $rtb_controller->settings->get_setting( 'license-etfrtb' );
30
public function set_permissions() {
31
global $rtb_controller;
32
33
+ if ( get_option( "rtb-permission-level" ) == 2 ) { return; }
34
+
35
$cffrtb = $rtb_controller->settings->get_setting( 'license-cffrtb' );
36
$ebfrtb = $rtb_controller->settings->get_setting( 'license-ebfrtb' );
37
$etfrtb = $rtb_controller->settings->get_setting( 'license-etfrtb' );
includes/template-functions.php CHANGED
@@ -83,6 +83,10 @@ function rtb_print_booking_form( $args = array() ) {
83
84
?>
85
86
<div class="rtb-booking-form">
87
<?php if ( $rtb_controller->request->request_inserted === true ) : ?>
88
<div class="rtb-message">
83
84
?>
85
86
+ <script type="text/javascript">
87
+ var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>';
88
+ </script>
89
+
90
<div class="rtb-booking-form">
91
<?php if ( $rtb_controller->request->request_inserted === true ) : ?>
92
<div class="rtb-message">
readme.txt CHANGED
@@ -175,6 +175,10 @@ Find answers to even more questions in the [FAQ](http://doc.fivestarplugins.com/
175
176
== Changelog ==
177
178
= 2.0.8 (2019-11-01) =
179
- Corrects issue that was causing the array_key_exists null given error
180
175
176
== Changelog ==
177
178
+ = 2.0.9 (2019-11-04) =
179
+ - Fixes the issue with exceptions when max reservations wasn't enabled
180
+ - Fixes the ajaxurl JS error
181
+
182
= 2.0.8 (2019-11-01) =
183
- Corrects issue that was causing the array_key_exists null given error
184
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.8
7
* Author: FiveStarPlugins
8
* Author URI: https://profiles.wordpress.org/fivestarplugins/
9
* Text Domain: restaurant-reservations
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.9
7
* Author: FiveStarPlugins
8
* Author URI: https://profiles.wordpress.org/fivestarplugins/
9
* Text Domain: restaurant-reservations