Version Description
(2020-06-08) = - Fixes an invalid foreach warning that was displaying - Fixes an pagination issue on the Bookings admin page
Download this release
Release Info
Developer | Rustaurius |
Plugin | Restaurant Reservations |
Version | 2.1.8 |
Comparing to | |
See all releases |
Code changes from version 2.1.7 to 2.1.8
- includes/Ajax.class.php +1 -0
- includes/Settings.class.php +5 -0
- includes/WP_List_Table.BookingsTable.class.php +1 -1
- includes/template-functions.php +4 -4
- readme.txt +6 -0
- restaurant-reservations.php +1 -1
includes/Ajax.class.php
CHANGED
@@ -644,6 +644,7 @@ if ( !class_exists( 'rtbAJAX' ) ) {
|
|
644 |
$formatted_tables = array();
|
645 |
|
646 |
$tables = json_decode( html_entity_decode( $rtb_controller->settings->get_setting( 'rtb-tables' ) ) );
|
|
|
647 |
|
648 |
foreach ( $table_numbers as $table_number ) {
|
649 |
|
644 |
$formatted_tables = array();
|
645 |
|
646 |
$tables = json_decode( html_entity_decode( $rtb_controller->settings->get_setting( 'rtb-tables' ) ) );
|
647 |
+
$tables = is_array( $tables ) ? $tables : array();
|
648 |
|
649 |
foreach ( $table_numbers as $table_number ) {
|
650 |
|
includes/Settings.class.php
CHANGED
@@ -2641,7 +2641,10 @@ If you were not the one to cancel this booking, please contact us.
|
|
2641 |
$options = array();
|
2642 |
|
2643 |
$table_sections = json_decode( html_entity_decode( $this->get_setting( 'rtb-table-sections' ) ) );
|
|
|
|
|
2644 |
$tables = json_decode( html_entity_decode( $this->get_setting( 'rtb-tables' ) ) );
|
|
|
2645 |
|
2646 |
foreach ( $tables as $table ) {
|
2647 |
|
@@ -2676,6 +2679,7 @@ If you were not the one to cancel this booking, please contact us.
|
|
2676 |
public function load_sorted_tables() {
|
2677 |
|
2678 |
$tables = json_decode( html_entity_decode( $this->get_setting( 'rtb-tables' ) ) );
|
|
|
2679 |
|
2680 |
$sorted_tables = array();
|
2681 |
foreach ( $tables as $table ) {
|
@@ -2972,6 +2976,7 @@ If you were not the one to cancel this booking, please contact us.
|
|
2972 |
public function get_table_section_options() {
|
2973 |
|
2974 |
$table_sections = json_decode( html_entity_decode( $this->get_setting( 'rtb-table-sections' ) ) );
|
|
|
2975 |
|
2976 |
$table_section_options = array();
|
2977 |
foreach ( $table_sections as $table_section ) {
|
2641 |
$options = array();
|
2642 |
|
2643 |
$table_sections = json_decode( html_entity_decode( $this->get_setting( 'rtb-table-sections' ) ) );
|
2644 |
+
$table_sections = is_array( $table_sections ) ? $table_sections : array();
|
2645 |
+
|
2646 |
$tables = json_decode( html_entity_decode( $this->get_setting( 'rtb-tables' ) ) );
|
2647 |
+
$tables = is_array( $tables ) ? $tables : array();
|
2648 |
|
2649 |
foreach ( $tables as $table ) {
|
2650 |
|
2679 |
public function load_sorted_tables() {
|
2680 |
|
2681 |
$tables = json_decode( html_entity_decode( $this->get_setting( 'rtb-tables' ) ) );
|
2682 |
+
$tables = is_array( $tables ) ? $tables : array();
|
2683 |
|
2684 |
$sorted_tables = array();
|
2685 |
foreach ( $tables as $table ) {
|
2976 |
public function get_table_section_options() {
|
2977 |
|
2978 |
$table_sections = json_decode( html_entity_decode( $this->get_setting( 'rtb-table-sections' ) ) );
|
2979 |
+
$table_sections = is_array( $table_sections ) ? $table_sections : array();
|
2980 |
|
2981 |
$table_section_options = array();
|
2982 |
foreach ( $table_sections as $table_section ) {
|
includes/WP_List_Table.BookingsTable.class.php
CHANGED
@@ -865,7 +865,7 @@ class rtbBookingsTable extends WP_List_Table {
|
|
865 |
|
866 |
global $wpdb;
|
867 |
|
868 |
-
$where = "WHERE p.post_type = '" . RTB_BOOKING_POST_TYPE . "'";
|
869 |
|
870 |
if ( $this->filter_start_date !== null || $this->filter_end_date !== null ) {
|
871 |
|
865 |
|
866 |
global $wpdb;
|
867 |
|
868 |
+
$where = "WHERE p.post_type = '" . RTB_BOOKING_POST_TYPE . "' AND p.post_status != 'draft'";
|
869 |
|
870 |
if ( $this->filter_start_date !== null || $this->filter_end_date !== null ) {
|
871 |
|
includes/template-functions.php
CHANGED
@@ -358,8 +358,8 @@ function rtb_process_stripe_payment() {
|
|
358 |
} // endif;
|
359 |
|
360 |
// add an output buffer layer for the plugin
|
361 |
-
add_action('init', 'rtb_add_ob_start');
|
362 |
-
add_action('shutdown', 'rtb_flush_ob_end');
|
363 |
|
364 |
// If there's an IPN request, add our setup function to potentially handle it
|
365 |
if ( isset($_POST['ipn_track_id']) ) { add_action( 'init', 'rtb_setup_paypal_ipn', 1); }
|
@@ -477,7 +477,7 @@ function rtb_add_ob_start() {
|
|
477 |
*/
|
478 |
if ( !function_exists( 'rtb_flush_ob_end' ) ) {
|
479 |
function rtb_flush_ob_end() {
|
480 |
-
ob_end_clean();
|
481 |
}
|
482 |
} // endif;
|
483 |
|
@@ -671,7 +671,7 @@ function rtb_enqueue_assets() {
|
|
671 |
|
672 |
if ( function_exists('get_current_screen') ) {
|
673 |
$screen = get_current_screen();
|
674 |
-
$screenID = $screen->id;
|
675 |
}
|
676 |
else {
|
677 |
$screenID = '';
|
358 |
} // endif;
|
359 |
|
360 |
// add an output buffer layer for the plugin
|
361 |
+
add_action( 'init', 'rtb_add_ob_start' );
|
362 |
+
add_action( 'shutdown', 'rtb_flush_ob_end' );
|
363 |
|
364 |
// If there's an IPN request, add our setup function to potentially handle it
|
365 |
if ( isset($_POST['ipn_track_id']) ) { add_action( 'init', 'rtb_setup_paypal_ipn', 1); }
|
477 |
*/
|
478 |
if ( !function_exists( 'rtb_flush_ob_end' ) ) {
|
479 |
function rtb_flush_ob_end() {
|
480 |
+
if ( ob_get_length() ) { ob_end_clean(); }
|
481 |
}
|
482 |
} // endif;
|
483 |
|
671 |
|
672 |
if ( function_exists('get_current_screen') ) {
|
673 |
$screen = get_current_screen();
|
674 |
+
$screenID = is_object( $screen ) ? $screen->id : '';
|
675 |
}
|
676 |
else {
|
677 |
$screenID = '';
|
readme.txt
CHANGED
@@ -15,6 +15,8 @@ Restaurant reservations made easy. Accept reservations and table bookings online
|
|
15 |
|
16 |
<strong>Includes Gutenberg restaurant block for displaying your reservation form!</strong> You can also use the handy restaurant reservation shortcode or set the reservation page directly in the plugin settings.
|
17 |
|
|
|
|
|
18 |
= Key Features =
|
19 |
|
20 |
* Create a customized restaurant reservation form
|
@@ -194,6 +196,10 @@ Find answers to even more questions in the [FAQ](http://doc.fivestarplugins.com/
|
|
194 |
|
195 |
== Changelog ==
|
196 |
|
|
|
|
|
|
|
|
|
197 |
= 2.1.7 (2020-06-05) =
|
198 |
- Includes a new RTU feature, booking by table
|
199 |
- Fixes an issue with the way payments are processed using one of the payment gateways
|
15 |
|
16 |
<strong>Includes Gutenberg restaurant block for displaying your reservation form!</strong> You can also use the handy restaurant reservation shortcode or set the reservation page directly in the plugin settings.
|
17 |
|
18 |
+
[Reservations Demo](https://www.fivestarplugins.com/five-star-restaurant-reservations-demo/)
|
19 |
+
|
20 |
= Key Features =
|
21 |
|
22 |
* Create a customized restaurant reservation form
|
196 |
|
197 |
== Changelog ==
|
198 |
|
199 |
+
= 2.1.8 (2020-06-08) =
|
200 |
+
- Fixes an invalid foreach warning that was displaying
|
201 |
+
- Fixes an pagination issue on the Bookings admin page
|
202 |
+
|
203 |
= 2.1.7 (2020-06-05) =
|
204 |
- Includes a new RTU feature, booking by table
|
205 |
- Fixes an issue with the way payments are processed using one of the payment gateways
|
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.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.1.8
|
7 |
* Author: FiveStarPlugins
|
8 |
* Author URI: https://profiles.wordpress.org/fivestarplugins/
|
9 |
* Text Domain: restaurant-reservations
|