mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Fix psalm
This commit is contained in:
parent
e1cd7d5ad1
commit
eb4fc639fc
3 changed files with 32 additions and 32 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue