Restaurant Reservations - Version 2.2.4

Version Description

(2021-03-31) = - Fixed an issue in which cancelled reservations were counting when calculating the maximum restrictions.

Download this release

Release Info

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

Code changes from version 2.2.3 to 2.2.4

includes/Ajax.class.php CHANGED
@@ -229,12 +229,13 @@ if ( !class_exists( 'rtbAJAX' ) ) {
229
  // If the restaurant is closed that day, return false
230
  if ( ! $hours ) { echo $hours; die(); }
231
 
232
- $args = array(
233
- 'posts_per_page' => -1,
234
- 'date_range' => 'dates',
235
- 'start_date' => $this->year . '-' . $this->month . '-' . $this->day,
236
- 'end_date' => $this->year . '-' . $this->month . '-' . $this->day
237
- );
 
238
 
239
  require_once( RTB_PLUGIN_DIR . '/includes/Query.class.php' );
240
  $query = new rtbQuery( $args );
229
  // If the restaurant is closed that day, return false
230
  if ( ! $hours ) { echo $hours; die(); }
231
 
232
+ $args = array(
233
+ 'posts_per_page' => -1,
234
+ 'date_range' => 'dates',
235
+ 'start_date' => $this->year . '-' . $this->month . '-' . $this->day,
236
+ 'end_date' => $this->year . '-' . $this->month . '-' . $this->day,
237
+ 'post_status' => ['pending', 'payment_pending', 'confirmed', 'arrived']
238
+ );
239
 
240
  require_once( RTB_PLUGIN_DIR . '/includes/Query.class.php' );
241
  $query = new rtbQuery( $args );
includes/Booking.class.php CHANGED
@@ -776,13 +776,14 @@ class rtbBooking {
776
  $after_time = strtotime($this->date) - $dining_block_seconds - (3600 * get_option( 'gmt_offset' ) );
777
  $before_time = strtotime($this->date) + $dining_block_seconds - (3600 * get_option( 'gmt_offset' ) );
778
 
779
- $args = array(
780
- 'posts_per_page' => -1,
781
- 'date_query' => array(
782
- 'before' => date( 'c', $before_time ),
783
- 'after' => date( 'c', $after_time )
784
- )
785
- );
 
786
 
787
  require_once( RTB_PLUGIN_DIR . '/includes/Query.class.php' );
788
  $query = new rtbQuery( $args );
@@ -841,9 +842,10 @@ class rtbBooking {
841
 
842
  $args = array(
843
  'posts_per_page' => -1,
844
- 'date_query' => array(
 
845
  'before' => date( 'c', $before_time ),
846
- 'after' => date( 'c', $after_time )
847
  )
848
  );
849
 
@@ -961,9 +963,10 @@ class rtbBooking {
961
 
962
  $args = array(
963
  'posts_per_page' => -1,
964
- 'date_query' => array(
 
965
  'before' => date( 'c', $before_time ),
966
- 'after' => date( 'c', $after_time )
967
  )
968
  );
969
 
@@ -1015,9 +1018,10 @@ class rtbBooking {
1015
 
1016
  $args = array(
1017
  'posts_per_page' => -1,
1018
- 'date_query' => array(
 
1019
  'before' => date( 'c', $before_time ),
1020
- 'after' => date( 'c', $after_time )
1021
  )
1022
  );
1023
 
776
  $after_time = strtotime($this->date) - $dining_block_seconds - (3600 * get_option( 'gmt_offset' ) );
777
  $before_time = strtotime($this->date) + $dining_block_seconds - (3600 * get_option( 'gmt_offset' ) );
778
 
779
+ $args = array(
780
+ 'posts_per_page' => -1,
781
+ 'post_status' => ['pending', 'payment_pending', 'confirmed', 'arrived'],
782
+ 'date_query' => array(
783
+ 'before' => date( 'c', $before_time ),
784
+ 'after' => date( 'c', $after_time )
785
+ )
786
+ );
787
 
788
  require_once( RTB_PLUGIN_DIR . '/includes/Query.class.php' );
789
  $query = new rtbQuery( $args );
842
 
843
  $args = array(
844
  'posts_per_page' => -1,
845
+ 'post_status' => ['pending', 'payment_pending', 'confirmed', 'arrived'],
846
+ 'date_query' => array(
847
  'before' => date( 'c', $before_time ),
848
+ 'after' => date( 'c', $after_time )
849
  )
850
  );
851
 
963
 
964
  $args = array(
965
  'posts_per_page' => -1,
966
+ 'post_status' => ['confirmed', 'arrived'],
967
+ 'date_query' => array(
968
  'before' => date( 'c', $before_time ),
969
+ 'after' => date( 'c', $after_time )
970
  )
971
  );
972
 
1018
 
1019
  $args = array(
1020
  'posts_per_page' => -1,
1021
+ 'post_status' => ['confirmed', 'arrived'],
1022
+ 'date_query' => array(
1023
  'before' => date( 'c', $before_time ),
1024
+ 'after' => date( 'c', $after_time )
1025
  )
1026
  );
1027
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: FiveStarPlugins
3
  Requires at Least: 4.4
4
  Tested Up To: 5.7
5
  Tags: reservation, reservations, restaurant reservations, reservation form, restaurant booking, restaurant reservation form, restaurant booking form, restaurant booking system, reservation system, online reservations, online restaurant booking, dinner reservations, restaurant form, gutenberg reservations, gutenberg restaurant reservations, gutenberg restaurant booking, mobile reservations, responsive reservations, table reservations, open table, book table, reserve table, easy reservations, simple reservations, quick restaurant reservations, custom reservation form, custom restaurant reservations
6
- Stable tag: 2.2.3
7
  License: GPLv3
8
  License URI:http://www.gnu.org/licenses/gpl-3.0.html
9
  Donate Link: https://www.etoilewebdesign.com/plugin-donations/
@@ -197,6 +197,9 @@ Find answers to even more questions in the [FAQ](http://doc.fivestarplugins.com/
197
 
198
  == Changelog ==
199
 
 
 
 
200
  = 2.2.3 (2021-03-11) =
201
  - Fixed an issue in which the notification emails were not being sent after a booking with a PayPal deposit was made.
202
  - Fixed an issue in which updating a booking would sometimes not work from the admin due to duplicate booking validation.
3
  Requires at Least: 4.4
4
  Tested Up To: 5.7
5
  Tags: reservation, reservations, restaurant reservations, reservation form, restaurant booking, restaurant reservation form, restaurant booking form, restaurant booking system, reservation system, online reservations, online restaurant booking, dinner reservations, restaurant form, gutenberg reservations, gutenberg restaurant reservations, gutenberg restaurant booking, mobile reservations, responsive reservations, table reservations, open table, book table, reserve table, easy reservations, simple reservations, quick restaurant reservations, custom reservation form, custom restaurant reservations
6
+ Stable tag: 2.2.4
7
  License: GPLv3
8
  License URI:http://www.gnu.org/licenses/gpl-3.0.html
9
  Donate Link: https://www.etoilewebdesign.com/plugin-donations/
197
 
198
  == Changelog ==
199
 
200
+ = 2.2.4 (2021-03-31) =
201
+ - Fixed an issue in which cancelled reservations were counting when calculating the maximum restrictions.
202
+
203
  = 2.2.3 (2021-03-11) =
204
  - Fixed an issue in which the notification emails were not being sent after a booking with a PayPal deposit was made.
205
  - Fixed an issue in which updating a booking would sometimes not work from the admin due to duplicate booking validation.
restaurant-reservations.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Five Star Restaurant Reservations - WordPress Booking Plugin
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.2.3
7
  * Author: FiveStarPlugins
8
  * Author URI: https://profiles.wordpress.org/fivestarplugins/
9
  * Text Domain: restaurant-reservations
3
  * Plugin Name: Five Star Restaurant Reservations - WordPress Booking Plugin
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.2.4
7
  * Author: FiveStarPlugins
8
  * Author URI: https://profiles.wordpress.org/fivestarplugins/
9
  * Text Domain: restaurant-reservations