Update logic for checking if webhook configuration is present

This commit is contained in:
Benjamin Beganović 2021-05-29 13:16:22 +02:00
parent 28da2dea26
commit c7739e64ec

View File

@ -629,8 +629,7 @@ class SubscriptionService
*/
public function triggerWebhook($context)
{
/* If no webhooks have been set, then just return gracefully */
if(!array_key_exists('post_purchase_url', $this->subscription->webhook_configuration) || !array_key_exists('post_purchase_rest_method', $this->subscription->webhook_configuration)) {
if (empty($this->subscription->webhook_configuration['post_purchase_url']) || empty($this->subscription->webhook_configuration['post_purchase_rest_method'])) {
return true;
}