target_type, array( OfferTarget::COURSE, OfferTarget::SECTIONS, OfferTarget::LESSON ), true ); } public function access_until( string $paid_at ): ?string { if ( null === $this->access_days || $this->access_days <= 0 ) { return null; } return gmdate( 'Y-m-d H:i:s', (int) strtotime( $paid_at . ' UTC' ) + $this->access_days * DAY_IN_SECONDS ); } }