Fix incorrect determination of booking button status
This commit is contained in:
@@ -274,7 +274,12 @@ class DateService implements SingletonInterface
|
|||||||
$nonBookableDateUids = $resolvedOptions['nonBookableDateUids'];
|
$nonBookableDateUids = $resolvedOptions['nonBookableDateUids'];
|
||||||
|
|
||||||
foreach ($dateTableData as $row) {
|
foreach ($dateTableData as $row) {
|
||||||
$showBookingButton = $resolvedOptions['showBookingButton'] || !in_array($row['dateBusProId'], $nonBookableDateUids, false);
|
// Default booking button status is determined by the product
|
||||||
|
$showBookingButton = $resolvedOptions['showBookingButton'];
|
||||||
|
// Check if booking button is disabled for this date
|
||||||
|
if (true === in_array($row['dateBusProId'], $nonBookableDateUids, false)) {
|
||||||
|
$showBookingButton = false;
|
||||||
|
}
|
||||||
|
|
||||||
$dateStart = new \DateTime($row['dateStart']);
|
$dateStart = new \DateTime($row['dateStart']);
|
||||||
$dateEnd = new \DateTime($row['dateEnd']);
|
$dateEnd = new \DateTime($row['dateEnd']);
|
||||||
|
|||||||
Reference in New Issue
Block a user