We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
magento2-module-store-locator/Model/Retailer/ScheduleManagement.php
Line 57 in 14655c0
If a TimeSloteInterface is found, return that interface and not an array.
Change
/** * Retrieve opening hours for a given date * * @SuppressWarnings(PHPMD.StaticAccess) * * @param RetailerInterface $retailer The retailer * @param null $dateTime The date to retrieve opening hours for * * @return RetailerTimeSlotInterface|null */ public function getOpeningHours($retailer, $dateTime = null): ?RetailerTimeSlotInterface { $dayOpening = null; if ($dateTime == null) { $dateTime = new \DateTime(); } if (is_string($dateTime)) { $dateTime = \DateTime::createFromFormat('Y-m-d', $dateTime); } $dayOfWeek = $dateTime->format('w'); $date = $dateTime->format('Y-m-d'); $openingHours = $retailer->getExtensionAttributes()->getOpeningHours(); $specialOpeningHours = $retailer->getExtensionAttributes()->getSpecialOpeningHours(); if (isset($openingHours[$dayOfWeek])) { $dayOpening = $openingHours[$dayOfWeek]; } if (isset($specialOpeningHours[$date])) { $dayOpening = $specialOpeningHours[$date]; } return $dayOpening; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
magento2-module-store-locator/Model/Retailer/ScheduleManagement.php
Line 57 in 14655c0
If a TimeSloteInterface is found, return that interface and not an array.
Change
The text was updated successfully, but these errors were encountered: