Change the calculation date for orders - rvola/woo-cancel-abandoned-order GitHub Wiki
For example, if you have Proforma commands. The expiry time of the legal order is 3 days.
The plugin in its configuration could cancel orders during the weekend. Here is a filter to modify this:
function woa_date_order_hook( $old_date, $gateway, $mode ) { // For example, change date only for cheque. if ( 'cheque' == $gateway ) { $old_date = strtotime( 'today -3 weekdays' ); } return $old_date; } add_filter( 'woo_cao_date_order', 'woa_date_order_hook', 10, 3 );