Skip to content
Snippets Groups Projects

Prevent WSOD when loading a store-orphaned order

3 files
+ 6
1
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -665,7 +665,7 @@ class Order extends CommerceContentEntityBase implements OrderInterface {
* {@inheritdoc}
*/
public function getCalculationDate() {
$timezone = $this->getStore()->getTimezone();
$timezone = $this->getStore()?->getTimezone();
$timestamp = $this->getPlacedTime() ?: \Drupal::time()->getRequestTime();
$date = DrupalDateTime::createFromTimestamp($timestamp, $timezone);
Loading