From 99e4ed4963ab0ca86a85e491a97be1bc3bf61880 Mon Sep 17 00:00:00 2001 From: Vedanshu Jain Date: Tue, 28 Mar 2023 18:38:59 +0530 Subject: [PATCH] Make params inclusive. --- .../src/Database/Migrations/CustomOrderTable/CLIRunner.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/woocommerce/src/Database/Migrations/CustomOrderTable/CLIRunner.php b/plugins/woocommerce/src/Database/Migrations/CustomOrderTable/CLIRunner.php index 005220121d9..0b54d70cae3 100644 --- a/plugins/woocommerce/src/Database/Migrations/CustomOrderTable/CLIRunner.php +++ b/plugins/woocommerce/src/Database/Migrations/CustomOrderTable/CLIRunner.php @@ -346,7 +346,7 @@ class CLIRunner { $order_ids = $wpdb->get_col( $wpdb->prepare( - "SELECT ID FROM $wpdb->posts WHERE post_type = 'shop_order' AND ID > %d AND ID < %d ORDER BY ID ASC LIMIT %d", + "SELECT ID FROM $wpdb->posts WHERE post_type = 'shop_order' AND ID >= %d AND ID <= %d ORDER BY ID ASC LIMIT %d", $order_id_start, $order_id_end, $batch_size @@ -444,7 +444,7 @@ class CLIRunner { $order_count = (int) $wpdb->get_var( $wpdb->prepare( - "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'shop_order' AND ID > %d AND ID < %d", + "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'shop_order' AND ID >= %d AND ID <= %d", $order_id_start, $order_id_end )