From 9cba9551e2f2c50bd491df89ce613609be06a11b Mon Sep 17 00:00:00 2001 From: Brent Shepherd Date: Thu, 14 Feb 2013 15:20:46 +1000 Subject: [PATCH] Fix woocommerce_cancel_unpaid_orders() Cancel orders placed more than an hour in the past, not orders placed between now & 1 hour in the future. --- woocommerce-core-functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/woocommerce-core-functions.php b/woocommerce-core-functions.php index a919c76f7e6..2e628ea8283 100644 --- a/woocommerce-core-functions.php +++ b/woocommerce-core-functions.php @@ -2411,7 +2411,7 @@ function woocommerce_cancel_unpaid_orders() { if ( $held_duration == '' ) return; - $date = date( "Y-m-d H:i:s", strtotime( '+' . absint( $held_duration ) . ' MINUTES', current_time( 'timestamp' ) ) ); + $date = date( "Y-m-d H:i:s", strtotime( '-' . absint( $held_duration ) . ' MINUTES', current_time( 'timestamp' ) ) ); $unpaid_orders = $wpdb->get_col( $wpdb->prepare( " SELECT posts.ID