Orderstatus wijzigen van betalen op factuur.
- Activeer betalen met cheque
- Plaats onderstaande code in functions.php
Voeg dit toe aan bijv. je functions.php bestand van je child-theme.
add_action( 'woocommerce_thankyou', 'cheque_payment_method_order_status_to_processing', 10, 1 ); function cheque_payment_method_order_status_to_processing( $order_id ) { if ( ! $order_id ) return; $order = wc_get_order( $order_id ); // Updating order status to processing for orders delivered with Cheque payment methods. if ( get_post_meta($order->id, '_payment_method', true) == 'cheque' ) $order->update_status( 'processing' ); }