More code cleanup

This commit is contained in:
David Stone
2025-02-09 11:32:57 -07:00
parent 07a69d33e5
commit d9122a410d
14 changed files with 16 additions and 20 deletions

View File

@ -482,7 +482,7 @@ class Membership extends Base_Model {
if ($plan && ($plan->get_duration() !== $this->get_duration() || $plan->get_duration_unit() !== $this->get_duration_unit())) {
$variation = $plan->get_as_variation($this->get_duration(), $this->get_duration_unit());
$plan = ($variation ?: null) ?? $plan;
$plan = ($variation ? $variation : null) ?? $plan;
}
return $plan;