Restaurant Reservations - Version 2.2.2

Version Description

(2020-11-03) = - Adds in a 'rtb_determine_booking_status' filter to allow users to set the status of a booking before its inserted

Download this release

Release Info

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

Code changes from version 2.2.1 to 2.2.2

includes/Booking.class.php CHANGED
@@ -1044,18 +1044,20 @@ class rtbBooking {
1044
  global $rtb_controller;
1045
 
1046
  if ( !empty( $_POST['rtb-post-status'] ) && array_key_exists( $_POST['rtb-post-status'], $rtb_controller->cpts->booking_statuses ) ) {
1047
- $this->post_status = sanitize_text_field( stripslashes_deep( $_POST['rtb-post-status'] ) );
1048
  } elseif ( $rtb_controller->settings->get_setting( 'require-deposit' ) and ! $payment_made ) {
1049
- $this->post_status = 'draft';
1050
  } elseif ( $this->party < $rtb_controller->settings->get_setting( 'auto-confirm-max-party-size' ) ) {
1051
- $this->post_status = 'confirmed';
1052
  } elseif ($rtb_controller->settings->get_setting( 'auto-confirm-max-reservations' ) and $this->under_max_confirm_reservations() ) {
1053
- $this->post_status = 'confirmed';
1054
  } elseif ( $rtb_controller->settings->get_setting( 'auto-confirm-max-seats' ) and $this->under_max_confirm_seats() ) {
1055
- $this->post_status = 'confirmed';
1056
  } else {
1057
- $this->post_status = 'pending';
1058
  }
 
 
1059
  }
1060
 
1061
  /**
1044
  global $rtb_controller;
1045
 
1046
  if ( !empty( $_POST['rtb-post-status'] ) && array_key_exists( $_POST['rtb-post-status'], $rtb_controller->cpts->booking_statuses ) ) {
1047
+ $post_status = sanitize_text_field( stripslashes_deep( $_POST['rtb-post-status'] ) );
1048
  } elseif ( $rtb_controller->settings->get_setting( 'require-deposit' ) and ! $payment_made ) {
1049
+ $post_status = 'draft';
1050
  } elseif ( $this->party < $rtb_controller->settings->get_setting( 'auto-confirm-max-party-size' ) ) {
1051
+ $post_status = 'confirmed';
1052
  } elseif ($rtb_controller->settings->get_setting( 'auto-confirm-max-reservations' ) and $this->under_max_confirm_reservations() ) {
1053
+ $post_status = 'confirmed';
1054
  } elseif ( $rtb_controller->settings->get_setting( 'auto-confirm-max-seats' ) and $this->under_max_confirm_seats() ) {
1055
+ $post_status = 'confirmed';
1056
  } else {
1057
+ $post_status = 'pending';
1058
  }
1059
+
1060
+ $this->post_status = apply_filters( 'rtb_determine_booking_status', $post_status, $this );
1061
  }
1062
 
1063
  /**
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: FiveStarPlugins
3
  Requires at Least: 4.4
4
  Tested Up To: 5.5
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.1
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.1 (2020-10-28) =
201
  - Added the ultimate reminder and late notification emails to the designer.
202
  - Corrected a notice related to the new feature to disable the IP capture.
3
  Requires at Least: 4.4
4
  Tested Up To: 5.5
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.2
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.2 (2020-11-03) =
201
+ - Adds in a 'rtb_determine_booking_status' filter to allow users to set the status of a booking before its inserted
202
+
203
  = 2.2.1 (2020-10-28) =
204
  - Added the ultimate reminder and late notification emails to the designer.
205
  - Corrected a notice related to the new feature to disable the IP capture.
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.1
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.2
7
  * Author: FiveStarPlugins
8
  * Author URI: https://profiles.wordpress.org/fivestarplugins/
9
  * Text Domain: restaurant-reservations