mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
log when no handler was found
This commit is contained in:
parent
e3e54aee9c
commit
ea56fd914d
1 changed files with 12 additions and 1 deletions
|
@ -107,7 +107,18 @@ class IncomingWebhookEndpoint
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$response = ['success' => false];
|
$message = sprintf(
|
||||||
|
__('Could not find handler for request type %s', 'woocommerce-paypal-commerce-gateway'),
|
||||||
|
$request['event_type']
|
||||||
|
);
|
||||||
|
$this->logger->log(
|
||||||
|
'warning',
|
||||||
|
$message,
|
||||||
|
[
|
||||||
|
'request' => $request,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
$response = ['success' => false, 'message' => $message];
|
||||||
return rest_ensure_response($response);
|
return rest_ensure_response($response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue