Skip to content

Commit

Permalink
Add webhooks logging in debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
vbelolapotkov committed Apr 20, 2020
1 parent d5a1d75 commit d3e0817
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions includes/admin/class-wc-rest-payments-webhook-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ public function handle_webhook( $request ) {
$event_data = $this->read_property( $body, 'data' );
$event_object = $this->read_property( $event_data, 'object' );

Logger::debug( 'Webhook recieved: ' . $event_type );
Logger::debug( 'Webhook body: ' . var_export( $body, true ) ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_var_export

switch ( $event_type ) {
case 'charge.refund.updated':
$this->process_webhook_refund_updated( $event_object );
Expand Down

0 comments on commit d3e0817

Please sign in to comment.