Skip to content

Commit

Permalink
Merge branch '4.x' into 4.7
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeholder committed Oct 16, 2024
2 parents 0225837 + 1b36426 commit c8e7cdf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release Notes for Craft Commerce

## Unreleased

- Fixed a PHP error that could occur when creating a subscription. ([#3710](https://github.com/craftcms/commerce/issues/))

## 4.6.13 - 2024-10-02

- Fixed a PHP error that could occur when deleting a user with orders. ([#3686](https://github.com/craftcms/commerce/issues/3686))
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/SubscriptionsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ public function actionSubscribe(): ?Response
$error = $exception->getMessage();
}

if ($returnUrl) {
if (!$error && $returnUrl) {
$returnUrl = $this->getView()->renderObjectTemplate($returnUrl, $subscription);
$subscriptionRecord = SubscriptionRecord::findOne($subscription->id);
$subscriptionRecord->returnUrl = $returnUrl;
Expand Down

0 comments on commit c8e7cdf

Please sign in to comment.