Fix psalm

This commit is contained in:
Emili Castells Guasch 2023-08-30 16:22:23 +02:00
parent 5852e45178
commit 1942acf67b
2 changed files with 4 additions and 7 deletions

View file

@ -112,8 +112,7 @@ class PaymentCaptureRefunded implements RequestHandler {
'amount' => $request['resource']['amount']['value'],
)
);
if ( is_wp_error( $refund ) ) {
assert( $refund instanceof WP_Error );
if ( $refund instanceof WP_Error ) {
$message = sprintf(
'Order %1$s could not be refunded. %2$s',
(string) $wc_order->get_id(),