Skip to content
Snippets Groups Projects

Issue #3482013 by jsacksick, tomtech, nojj, qaiser iqbal, roberto.musa: Error:...

Merged Tom Ashe requested to merge issue/commerce_license-3482013:3482013-error-call-to into 3.0.x
3 files
+ 18
9
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 4
0
@@ -4,6 +4,7 @@ namespace Drupal\commerce_license\Entity;
use Drupal\commerce\EntityOwnerTrait;
use Drupal\commerce\Interval;
use Drupal\commerce_license\Plugin\Commerce\LicensePeriod\LicensePeriodInterface;
use Drupal\commerce_license\Plugin\Commerce\LicenseType\LicenseTypeInterface;
use Drupal\commerce_order\Entity\OrderInterface;
use Drupal\commerce_product\Entity\ProductVariationType;
@@ -550,6 +551,9 @@ class License extends ContentEntityBase implements LicenseInterface {
$interval_object = new Interval($allow_renewal_window_interval, $allow_renewal_window_period);
$renewal_window_start_time = new DrupalDateTime('@' . $this->getExpiresTime());
if ($renewal_window_start_time->getTimestamp() === LicensePeriodInterface::UNLIMITED) {
return FALSE;
}
$this->renewalWindowStartTime = $interval_object->subtract($renewal_window_start_time)->getTimestamp();
return $this->renewalWindowStartTime < \Drupal::time()->getRequestTime();
}
Loading