Skip to content

Commit

Permalink
Merge branch 'v3' into develop
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGELOG.md
#	composer.json
#	src/elements/Product.php
#	src/elements/Variant.php
  • Loading branch information
nfourtythree committed Oct 13, 2023
2 parents e0ed13c + 8b8920a commit dcf2dbb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/base/Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ public function getWebhookUrl(array $params = []): string

$url = UrlHelper::actionUrl('commerce/webhooks/process-webhook', $params);

return StringHelper::replace($url, Craft::$app->getConfig()->getGeneral()->cpTrigger . '/', '');
// Remove the cpTrigger from the url if it's there.
if (Craft::$app->getConfig()->getGeneral()->cpTrigger) {
$url = StringHelper::replace($url, Craft::$app->getConfig()->getGeneral()->cpTrigger . '/', '');
}

return $url;
}

/**
Expand Down

0 comments on commit dcf2dbb

Please sign in to comment.