From 339c8d84242d4389805303c57e59aa43bbbd894c Mon Sep 17 00:00:00 2001 From: vendidero Date: Wed, 17 Jan 2024 17:10:04 +0100 Subject: [PATCH] Code formatting. --- src/ShipmentQuery.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ShipmentQuery.php b/src/ShipmentQuery.php index bd26e7ab..80aedf17 100644 --- a/src/ShipmentQuery.php +++ b/src/ShipmentQuery.php @@ -285,9 +285,9 @@ protected function prepare_query() { // order id if ( isset( $this->args['order_id'] ) ) { - $order_ids = array_map( 'absint', $this->args['order_id'] ); - $placeholders = implode( ',', array_fill( 0, count( $order_ids ), '%d' ) ); - $this->query_where .= $wpdb->prepare( " AND shipment_order_id IN ({$placeholders})", ...$order_ids ); + $order_ids = array_filter( array_map( 'absint', $this->args['order_id'] ) ); + $placeholders = implode( ',', array_fill( 0, count( $order_ids ), '%d' ) ); + $this->query_where .= $wpdb->prepare( " AND shipment_order_id IN ({$placeholders})", ...$order_ids ); // phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared, WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare } // order id