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.
This commit is contained in:
Brent Shepherd 2013-02-14 15:20:46 +10:00
parent 5e8fc500c9
commit 9cba9551e2
1 changed files with 1 additions and 1 deletions

View File

@ -2411,7 +2411,7 @@ function woocommerce_cancel_unpaid_orders() {
if ( $held_duration == '' ) if ( $held_duration == '' )
return; 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( " $unpaid_orders = $wpdb->get_col( $wpdb->prepare( "
SELECT posts.ID SELECT posts.ID