Problem with work
-
Hi there,
Hi, I don’t know much about php, but I know what to change. I would like the order to be canceled if, when paying by the bank, if it is not paid for one minute. It doesn’t work with the following settings.
Please help
function woa_custom_gateways_hook( $gateways ) { $gateways[] = 'bacs'; // Bank return $gateways; } add_filter( 'woo_cao_gateways', 'woa_custom_gateways_hook', 10, 1); function woa_date_order_hook( $old_date, $gateway, $mode ) { // For example, change date only for cheque. if ( 'cheque' == $gateway ) { $old_date = strtotime( 'today -1 minutes' ); } return $old_date; } add_filter( 'woo_cao_date_order', 'woa_date_order_hook', 10, 3 ); function woa_custom_statustocancel_hook( $status ) { // More explication on WooCommerce status : https://docs.woocommerce.com/document/managing-orders/ $status[] = 'pending'; return $status; } add_filter( 'woo_cao_statustocancel', 'woa_custom_statustocancel_hook', 10, 1 );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Problem with work’ is closed to new replies.