Fix psalm

This commit is contained in:
dinamiko 2022-07-20 12:16:33 +02:00
parent e1cd7d5ad1
commit eb4fc639fc
3 changed files with 32 additions and 32 deletions

View file

@ -69,7 +69,7 @@ class ReturnUrlEndpoint {
}
$wc_order = wc_get_order( $wc_order_id );
if ( ! $wc_order ) {
if ( ! is_a( $wc_order, \WC_Order::class ) ) {
exit();
}

View file

@ -114,7 +114,7 @@ class OXXO {
add_filter(
'ppcp_payment_capture_reversed_webhook_update_status_note',
function( $note, $wc_order, $event_type ) {
function( string $note, WC_Order $wc_order, string $event_type ): string {
if ( $wc_order->get_payment_method() === OXXOGateway::ID && $event_type === 'PAYMENT.CAPTURE.DENIED' ) {
$note = __( 'OXXO voucher has expired or the buyer didn\'t complete the payment successfully.', 'woocommerce-paypal-payments' );
}
@ -122,7 +122,7 @@ class OXXO {
return $note;
},
10,
2
3
);
}