Restaurant Reservations - Version 2.2.1

Version Description

(2020-10-28) = - Added the ultimate reminder and late notification emails to the designer. - Corrected a notice related to the new feature to disable the IP capture.

Download this release

Release Info

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

Code changes from version 2.2.0 to 2.2.1

includes/Booking.class.php CHANGED
@@ -1029,7 +1029,6 @@ class rtbBooking {
1029
  if ( key ( $current_seats ) < $time - $dining_block_seconds ) { array_shift( $current_seats ); }
1030
 
1031
  // Check if adding the current party puts us at or above the max confirmation number
1032
- var_dump($current_seats, array_sum( $current_seats ), $this->party, $max_seats);
1033
  if ( array_sum( $current_seats ) + $this->party >= $max_seats ) { $auto_confirm = false; break; }
1034
  }
1035
 
@@ -1126,9 +1125,12 @@ class rtbBooking {
1126
  'party' => $this->party,
1127
  'email' => $this->email,
1128
  'phone' => $this->phone,
1129
- 'ip' => $this->ip,
1130
  );
1131
 
 
 
 
 
1132
  if ( empty( $this->date_submission ) ) {
1133
  $meta['date_submission'] = current_time( 'timestamp' );
1134
  } else {
1029
  if ( key ( $current_seats ) < $time - $dining_block_seconds ) { array_shift( $current_seats ); }
1030
 
1031
  // Check if adding the current party puts us at or above the max confirmation number
 
1032
  if ( array_sum( $current_seats ) + $this->party >= $max_seats ) { $auto_confirm = false; break; }
1033
  }
1034
 
1125
  'party' => $this->party,
1126
  'email' => $this->email,
1127
  'phone' => $this->phone,
 
1128
  );
1129
 
1130
+ if ( !empty( $this->ip ) ) {
1131
+ $meta['ip'] = $this->ip;
1132
+ }
1133
+
1134
  if ( empty( $this->date_submission ) ) {
1135
  $meta['date_submission'] = current_time( 'timestamp' );
1136
  } else {
includes/MultipleLocations.class.php CHANGED
@@ -668,11 +668,12 @@ if ( ! class_exists( 'rtbMultipleLocations', false ) ) {
668
  $location_name = is_null( $term ) || is_wp_error( $term ) ? '' : $term->name;
669
 
670
  $table_number = empty( $notification->booking->table ) ? '' : $notification->booking->table;
 
671
 
672
  return array_merge(
673
  array(
674
  '{location}' => $location_name,
675
- '{table}' => implode(',', $table_number ),
676
  ),
677
  $template_tags
678
  );
668
  $location_name = is_null( $term ) || is_wp_error( $term ) ? '' : $term->name;
669
 
670
  $table_number = empty( $notification->booking->table ) ? '' : $notification->booking->table;
671
+ $table_number = is_array($table_number) ? implode(',', $table_number ) : $table_number;
672
 
673
  return array_merge(
674
  array(
675
  '{location}' => $location_name,
676
+ '{table}' => $table_number,
677
  ),
678
  $template_tags
679
  );
includes/class-designer.php CHANGED
@@ -188,6 +188,18 @@ class etfrtbDesigner {
188
  $this->set( 'lead', get_option( 'etfrtb_admin_notice_headline', $rtb_controller->settings->get_setting( 'subject-admin-notice' ) ) );
189
  $this->set( 'footer_message', get_option( 'etfrtb_admin_notice_footer_message', '' ) );
190
  break;
 
 
 
 
 
 
 
 
 
 
 
 
191
  }
192
 
193
  // Set up default notification templates when no actual notification
@@ -223,6 +235,16 @@ class etfrtbDesigner {
223
  $this->set( 'subject', $rtb_controller->settings->get_setting( 'subject-admin-notice' ) );
224
  $this->set( 'content', __( "This is an example of an Admin Update email. You can send a message to a customer from the list of bookings in your admin panel." ) );
225
  break;
 
 
 
 
 
 
 
 
 
 
226
  }
227
  }
228
  }
188
  $this->set( 'lead', get_option( 'etfrtb_admin_notice_headline', $rtb_controller->settings->get_setting( 'subject-admin-notice' ) ) );
189
  $this->set( 'footer_message', get_option( 'etfrtb_admin_notice_footer_message', '' ) );
190
  break;
191
+
192
+ case 'reminder-user' :
193
+ $this->set( 'template', get_option( 'etfrtb_reminder_user_template', 'conversations.php' ) );
194
+ $this->set( 'lead', get_option( 'etfrtb_reminder_user_headline', $rtb_controller->settings->get_setting( 'subject-reminder-user' ) ) );
195
+ $this->set( 'footer_message', get_option( 'etfrtb_reminder_user_footer_message', '' ) );
196
+ break;
197
+
198
+ case 'late-user' :
199
+ $this->set( 'template', get_option( 'etfrtb_late_user_template', 'conversations.php' ) );
200
+ $this->set( 'lead', get_option( 'etfrtb_late_user_headline', $rtb_controller->settings->get_setting( 'subject-late-user' ) ) );
201
+ $this->set( 'footer_message', get_option( 'etfrtb_late_user_footer_message', '' ) );
202
+ break;
203
  }
204
 
205
  // Set up default notification templates when no actual notification
235
  $this->set( 'subject', $rtb_controller->settings->get_setting( 'subject-admin-notice' ) );
236
  $this->set( 'content', __( "This is an example of an Admin Update email. You can send a message to a customer from the list of bookings in your admin panel." ) );
237
  break;
238
+
239
+ case 'reminder-user' :
240
+ $this->set( 'subject', $rtb_controller->settings->get_setting( 'subject-reminder-user' ) );
241
+ $this->set( 'content', wpautop( $rtb_controller->settings->get_setting( 'template-reminder-user' ) ) );
242
+ break;
243
+
244
+ case 'late-user' :
245
+ $this->set( 'subject', $rtb_controller->settings->get_setting( 'subject-late-user' ) );
246
+ $this->set( 'content', wpautop( $rtb_controller->settings->get_setting( 'template-late-user' ) ) );
247
+ break;
248
  }
249
  }
250
  }
includes/integrations/business-profile.php CHANGED
@@ -257,6 +257,14 @@ function etfrtb_bp_designer_setup( $designer ) {
257
  case 'admin-notice' :
258
  $designer->set( 'show_contact', get_option( 'etfrtb_admin_notice_footer_contact', 1 ) );
259
  break;
 
 
 
 
 
 
 
 
260
  }
261
  }
262
  add_filter( 'etfrtb_designer_setup', 'etfrtb_bp_designer_setup' );
@@ -340,6 +348,28 @@ function etfrtb_bp_customize_register( $wp_customize ) {
340
  )
341
  )
342
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
343
  }
344
  add_action( 'customize_register_email_designer' , 'etfrtb_bp_customize_register', 20 );
345
 
@@ -372,5 +402,7 @@ function etfrtb_bp_customize_register_settings( $wp_customize ) {
372
  $wp_customize->add_setting( 'etfrtb_confirmed_user_footer_contact', $footer_contact_settings );
373
  $wp_customize->add_setting( 'etfrtb_rejected_user_footer_contact', $footer_contact_settings );
374
  $wp_customize->add_setting( 'etfrtb_admin_notice_footer_contact', $footer_contact_settings );
 
 
375
  }
376
  add_action( 'customize_register', 'etfrtb_bp_customize_register_settings' );
257
  case 'admin-notice' :
258
  $designer->set( 'show_contact', get_option( 'etfrtb_admin_notice_footer_contact', 1 ) );
259
  break;
260
+
261
+ case 'reminder-user' :
262
+ $designer->set( 'show_contact', get_option( 'etfrtb_reminder_user_footer_contact', 1 ) );
263
+ break;
264
+
265
+ case 'late-user' :
266
+ $designer->set( 'show_contact', get_option( 'etfrtb_late_user_footer_contact', 1 ) );
267
+ break;
268
  }
269
  }
270
  add_filter( 'etfrtb_designer_setup', 'etfrtb_bp_designer_setup' );
348
  )
349
  )
350
  );
351
+
352
+ $wp_customize->add_control(
353
+ 'etfrtb_reminder_user_footer_contact',
354
+ array_merge(
355
+ $footer_contact_settings,
356
+ array(
357
+ 'section' => 'etfrtb-content-reminder-user',
358
+ 'settings' => 'etfrtb_reminder_user_footer_contact',
359
+ )
360
+ )
361
+ );
362
+
363
+ $wp_customize->add_control(
364
+ 'etfrtb_late_user_footer_contact',
365
+ array_merge(
366
+ $footer_contact_settings,
367
+ array(
368
+ 'section' => 'etfrtb-content-late-user',
369
+ 'settings' => 'etfrtb_late_user_footer_contact',
370
+ )
371
+ )
372
+ );
373
  }
374
  add_action( 'customize_register_email_designer' , 'etfrtb_bp_customize_register', 20 );
375
 
402
  $wp_customize->add_setting( 'etfrtb_confirmed_user_footer_contact', $footer_contact_settings );
403
  $wp_customize->add_setting( 'etfrtb_rejected_user_footer_contact', $footer_contact_settings );
404
  $wp_customize->add_setting( 'etfrtb_admin_notice_footer_contact', $footer_contact_settings );
405
+ $wp_customize->add_setting( 'etfrtb_reminder_user_footer_contact', $footer_contact_settings );
406
+ $wp_customize->add_setting( 'etfrtb_late_user_footer_contact', $footer_contact_settings );
407
  }
408
  add_action( 'customize_register', 'etfrtb_bp_customize_register_settings' );
includes/load-customizer.php CHANGED
@@ -375,6 +375,86 @@ function etfrtb_customize_register( $wp_customize ) {
375
  'description' => 'Add a short message to the footer.',
376
  )
377
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
378
  }
379
  }
380
 
@@ -639,6 +719,74 @@ function etfrtb_customize_register_settings( $wp_customize ) {
639
  'autoload' => false,
640
  )
641
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
642
  }
643
  }
644
  add_action( 'customize_register', 'etfrtb_customize_register_settings' );
375
  'description' => 'Add a short message to the footer.',
376
  )
377
  );
378
+
379
+ // User reminder email
380
+ $wp_customize->add_section(
381
+ 'etfrtb-content-reminder-user',
382
+ array(
383
+ 'title' => __( 'User Reminder', 'email-templates-for-rtb' ),
384
+ 'description' => __( 'The email a user receives as a reminder of the reservation.', 'email-templates-for-rtb' ),
385
+ )
386
+ );
387
+
388
+ $wp_customize->add_control(
389
+ 'etfrtb_reminder_user_template',
390
+ array(
391
+ 'section' => 'etfrtb-content-reminder-user',
392
+ 'settings' => 'etfrtb_reminder_user_template',
393
+ 'label' => __( 'Template', 'email-templates-for-rtb' ),
394
+ 'type' => 'select',
395
+ 'choices' => $template_selection,
396
+ )
397
+ );
398
+
399
+ $wp_customize->add_control(
400
+ 'etfrtb_reminder_user_headline',
401
+ array(
402
+ 'section' => 'etfrtb-content-reminder-user',
403
+ 'settings' => 'etfrtb_reminder_user_headline',
404
+ 'label' => __( 'Lead Sentence', 'email-templates-for-rtb' ),
405
+ 'description' => 'Add an attention-grabbing headline to this email.',
406
+ )
407
+ );
408
+
409
+ $wp_customize->add_control(
410
+ 'etfrtb_reminder_user_footer_message',
411
+ array(
412
+ 'section' => 'etfrtb-content-reminder-user',
413
+ 'settings' => 'etfrtb_reminder_user_footer_message',
414
+ 'label' => __( 'Footer Message', 'email-templates-for-rtb' ),
415
+ 'description' => 'Add a short message to the footer.',
416
+ )
417
+ );
418
+
419
+ // User late email
420
+ $wp_customize->add_section(
421
+ 'etfrtb-content-late-user',
422
+ array(
423
+ 'title' => __( 'User Late', 'email-templates-for-rtb' ),
424
+ 'description' => __( 'The email a user receives when they are late for their reservation.', 'email-templates-for-rtb' ),
425
+ )
426
+ );
427
+
428
+ $wp_customize->add_control(
429
+ 'etfrtb_late_user_template',
430
+ array(
431
+ 'section' => 'etfrtb-content-late-user',
432
+ 'settings' => 'etfrtb_late_user_template',
433
+ 'label' => __( 'Template', 'email-templates-for-rtb' ),
434
+ 'type' => 'select',
435
+ 'choices' => $template_selection,
436
+ )
437
+ );
438
+
439
+ $wp_customize->add_control(
440
+ 'etfrtb_late_user_headline',
441
+ array(
442
+ 'section' => 'etfrtb-content-late-user',
443
+ 'settings' => 'etfrtb_late_user_headline',
444
+ 'label' => __( 'Lead Sentence', 'email-templates-for-rtb' ),
445
+ 'description' => 'Add an attention-grabbing headline to this email.',
446
+ )
447
+ );
448
+
449
+ $wp_customize->add_control(
450
+ 'etfrtb_late_user_footer_message',
451
+ array(
452
+ 'section' => 'etfrtb-content-late-user',
453
+ 'settings' => 'etfrtb_late_user_footer_message',
454
+ 'label' => __( 'Footer Message', 'email-templates-for-rtb' ),
455
+ 'description' => 'Add a short message to the footer.',
456
+ )
457
+ );
458
  }
459
  }
460
 
719
  'autoload' => false,
720
  )
721
  );
722
+
723
+ // User Reminder email
724
+ $wp_customize->add_setting(
725
+ 'etfrtb_reminder_user_template',
726
+ array(
727
+ 'default' => 'conversations.php',
728
+ 'sanitize_callback' => 'sanitize_file_name',
729
+ 'capability' => 'manage_options',
730
+ 'type' => 'option',
731
+ 'autoload' => false,
732
+ )
733
+ );
734
+
735
+ $wp_customize->add_setting(
736
+ 'etfrtb_reminder_user_headline',
737
+ array(
738
+ 'default' => $rtb_controller->settings->get_setting( 'subject-reminder-user' ),
739
+ 'sanitize_callback' => 'sanitize_text_field',
740
+ 'capability' => 'manage_options',
741
+ 'type' => 'option',
742
+ 'autoload' => false,
743
+ )
744
+ );
745
+
746
+ $wp_customize->add_setting(
747
+ 'etfrtb_reminder_user_footer_message',
748
+ array(
749
+ 'default' => '',
750
+ 'sanitize_callback' => 'sanitize_text_field',
751
+ 'capability' => 'manage_options',
752
+ 'type' => 'option',
753
+ 'autoload' => false,
754
+ )
755
+ );
756
+
757
+ // User Late email
758
+ $wp_customize->add_setting(
759
+ 'etfrtb_late_user_template',
760
+ array(
761
+ 'default' => 'conversations.php',
762
+ 'sanitize_callback' => 'sanitize_file_name',
763
+ 'capability' => 'manage_options',
764
+ 'type' => 'option',
765
+ 'autoload' => false,
766
+ )
767
+ );
768
+
769
+ $wp_customize->add_setting(
770
+ 'etfrtb_late_user_headline',
771
+ array(
772
+ 'default' => $rtb_controller->settings->get_setting( 'subject-late-user' ),
773
+ 'sanitize_callback' => 'sanitize_text_field',
774
+ 'capability' => 'manage_options',
775
+ 'type' => 'option',
776
+ 'autoload' => false,
777
+ )
778
+ );
779
+
780
+ $wp_customize->add_setting(
781
+ 'etfrtb_late_user_footer_message',
782
+ array(
783
+ 'default' => '',
784
+ 'sanitize_callback' => 'sanitize_text_field',
785
+ 'capability' => 'manage_options',
786
+ 'type' => 'option',
787
+ 'autoload' => false,
788
+ )
789
+ );
790
  }
791
  }
792
  add_action( 'customize_register', 'etfrtb_customize_register_settings' );
includes/load-notifications.php CHANGED
@@ -52,6 +52,16 @@ function etfrtb_notification_email_template( $notification ) {
52
  $designer->setup( 'admin-notice', $notification );
53
  $notification->message = $designer->render();
54
  break;
 
 
 
 
 
 
 
 
 
 
55
  }
56
  }
57
  }
52
  $designer->setup( 'admin-notice', $notification );
53
  $notification->message = $designer->render();
54
  break;
55
+
56
+ case 'reminder' :
57
+ $designer->setup( 'reminder-user', $notification );
58
+ $notification->message = $designer->render();
59
+ break;
60
+
61
+ case 'late_user' :
62
+ $designer->setup( 'late-user', $notification );
63
+ $notification->message = $designer->render();
64
+ break;
65
  }
66
  }
67
  }
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.0
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,10 @@ Find answers to even more questions in the [FAQ](http://doc.fivestarplugins.com/
197
 
198
  == Changelog ==
199
 
 
 
 
 
200
  = 2.2.0 (2020-10-21) =
201
  - <strong>This is a relatively big update with several new features, corrections, 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 released).</strong>
202
  - Added in a new filtering option in the admin to display bookings from a specific date and/or time frame.
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
 
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.
203
+
204
  = 2.2.0 (2020-10-21) =
205
  - <strong>This is a relatively big update with several new features, corrections, 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 released).</strong>
206
  - Added in a new filtering option in the admin to display bookings from a specific date and/or time frame.
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.0
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.1
7
  * Author: FiveStarPlugins
8
  * Author URI: https://profiles.wordpress.org/fivestarplugins/
9
  * Text Domain: restaurant-reservations