diff --git a/CHANGELOG.md b/CHANGELOG.md index 5688469..fb2f653 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased - Fixed a bug where Craft user’s email address was not synced to Stripe even if `syncChangedUserEmailsToStripe` was set to `true`. ([#69](https://github.com/craftcms/stripe/issues/69)) +- Fixed a bug where the plugin was attempting to create missing users when `createUserIfMissing` was `true` but the Craft edition didn’t allow for multiple users. ([#72](https://github.com/craftcms/stripe/pull/72)) ## 1.3.2 - 2024-12-11 diff --git a/src/services/Subscriptions.php b/src/services/Subscriptions.php index a57621a..a8cbc3a 100644 --- a/src/services/Subscriptions.php +++ b/src/services/Subscriptions.php @@ -9,6 +9,7 @@ use Craft; use craft\elements\User; +use craft\enums\CmsEdition; use craft\events\ConfigEvent; use craft\helpers\Json; use craft\helpers\ProjectConfig; @@ -154,7 +155,7 @@ public function createOrUpdateSubscriptionElement(StripeSubscription $subscripti } $settings = Plugin::getInstance()->getSettings(); - if ($settings->createUserIfMissing) { + if ($settings->createUserIfMissing && Craft::$app->edition->value >= CmsEdition::Pro->value) { $this->ensureUser($subscription, $subscriptionElement); }