mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
Fix typo and use log warning
method
This commit is contained in:
parent
7d7f1f55d5
commit
0ceb3504b4
1 changed files with 3 additions and 8 deletions
|
@ -101,17 +101,12 @@ class PaymentCapturePending implements RequestHandler {
|
||||||
$wc_order = wc_get_order( $order_id );
|
$wc_order = wc_get_order( $order_id );
|
||||||
if ( ! is_a( $wc_order, \WC_Order::class ) ) {
|
if ( ! is_a( $wc_order, \WC_Order::class ) ) {
|
||||||
$message = sprintf(
|
$message = sprintf(
|
||||||
'Order for PayPal refund %s not found.',
|
'WC order for PayPal ID %s not found.',
|
||||||
$request['resource'] !== null && isset( $request['resource']['id'] ) ? $request['resource']['id'] : ''
|
$request['resource'] !== null && isset( $request['resource']['id'] ) ? $request['resource']['id'] : ''
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->logger->log(
|
$this->logger->warning( $message );
|
||||||
'warning',
|
|
||||||
$message,
|
|
||||||
array(
|
|
||||||
'request' => $request,
|
|
||||||
)
|
|
||||||
);
|
|
||||||
$response['message'] = $message;
|
$response['message'] = $message;
|
||||||
return new WP_REST_Response( $response );
|
return new WP_REST_Response( $response );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue