Skip to content

Commit

Permalink
Handle undefined booking_id in express checkout (#8218)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdmoore authored Feb 16, 2024
1 parent aff086e commit 698e851
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions changelog/fix-bookings-id-undefined-variable
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: fix
Comment: Small defensive check for booking_id variable.


Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public function ajax_add_to_cart() {
$data += $this->build_display_items();
$data['result'] = 'success';

if ( $booking_id ) {
if ( ! empty( $booking_id ) ) {
$data['bookingId'] = $booking_id;
}

Expand Down

0 comments on commit 698e851

Please sign in to comment.