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:
parent
5e8fc500c9
commit
9cba9551e2
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue