Held duration must be > 0. Closes #2766.
This commit is contained in:
parent
edb07efaef
commit
9c2a7afe8a
|
@ -2429,7 +2429,7 @@ function woocommerce_cancel_unpaid_orders() {
|
|||
|
||||
$held_duration = get_option( 'woocommerce_hold_stock_minutes' );
|
||||
|
||||
if ( $held_duration == '' || get_option( 'woocommerce_manage_stock' ) != 'yes' )
|
||||
if ( $held_duration < 1 || get_option( 'woocommerce_manage_stock' ) != 'yes' )
|
||||
return;
|
||||
|
||||
$date = date( "Y-m-d H:i:s", strtotime( '-' . absint( $held_duration ) . ' MINUTES', current_time( 'timestamp' ) ) );
|
||||
|
|
Loading…
Reference in New Issue