Change the calculation date for orders snippet
-
Hi,
I would like to use your snippet Change the calculation date for orders but I am not sure If I still need to enable the setting in the gateway or not?
I want the order to expire after 30 business days for bank payment gateway.
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 );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Change the calculation date for orders snippet’ is closed to new replies.