diff --git a/includes/reader-revenue/woocommerce/class-woocommerce-duplicate-orders.php b/includes/reader-revenue/woocommerce/class-woocommerce-duplicate-orders.php index 310747a469..a68e251462 100644 --- a/includes/reader-revenue/woocommerce/class-woocommerce-duplicate-orders.php +++ b/includes/reader-revenue/woocommerce/class-woocommerce-duplicate-orders.php @@ -118,7 +118,7 @@ public static function get_order_duplicates( $cutoff_time, $current_page = 0, $r * @param bool $save Whether to save the result as the option. * @param bool $upsert Whether to upsert the option (merge with existing). */ - public static function check_for_order_duplicates( $cutoff_time = DAY_IN_SECONDS, $save = false, $upsert = true ): array { + public static function check_for_order_duplicates( $cutoff_time = DAY_IN_SECONDS, $save = true, $upsert = true ): array { $order_duplicates = self::get_order_duplicates( $cutoff_time ); if ( empty( $order_duplicates ) ) { return []; @@ -237,7 +237,7 @@ public static function cli_upsert_order_duplicates( $args, $assoc_args ) { $cutoff_time = strtotime( $cutoff_time_str ) - time(); $save_as_option = isset( $assoc_args['save'] ) ? $assoc_args['save'] : false; - $duplicates = self::check_for_order_duplicates( $cutoff_time, $save_as_option, false ); + $duplicates = self::check_for_order_duplicates( $cutoff_time, $save_as_option ); if ( empty( $duplicates ) ) { \WP_CLI::success( 'No duplicate orders found.' );