Issue #3327540: Allow administrators to disable email notification sending on license expiration

Closes #3327540

Adds "Send email notification to customers on license expiration" to the license settings of a product variation type (default: on, as before).

The first commit is patch #9 from the issue as it was RTBC'd. The second fixes what review found in it:

  • No notification is queued for a type that has it off (LicenseExpire); the notification job keeps a guard for jobs queued before the setting changed, and skips them as a success — the patch returned JobResult::failure(), so every expiry left a failed job behind.
  • A license without a variation (e.g. created by hand) keeps the default instead of fataling on getPurchasedEntity()->bundle().
  • Removing the license trait removes the setting like every other license setting. The patch set it to TRUE instead and changed LicenseAdminTest to expect leftover settings; that assertion is restored.
  • $this->t() in the form, like the surrounding code.

LicenseExpireNotifySettingTest (new) covers: nothing queued when turned off, queued by default, and a queued notification skipped as a success with no mail. Both tests fail on patch #9 alone.

Merge request reports

Loading
Loading