Fix Psalm errors

This commit is contained in:
Narek Zakarian 2022-08-16 18:46:17 +04:00
parent 09420c0adb
commit 9b81ac54f2
5 changed files with 65 additions and 48 deletions

View file

@ -145,9 +145,13 @@ class OrderTrackingModule implements ModuleInterface {
return;
}
$wc_order = wc_get_order( $order_id );
$wc_order = wc_get_order( $order_id );
if ( ! is_a( $wc_order, WC_Order::class ) ) {
return;
}
$transaction_id = $wc_order->get_transaction_id();
if ( ! is_a( $wc_order, WC_Order::class ) || empty( $transaction_id ) ) {
if ( empty( $transaction_id ) ) {
return;
}