Orderstatus wijzigen van betalen op factuur.

  • Activeer betalen met cheque
  • Plaats onderstaande code in functions.php van je thema of Code Snippets
    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' );
    }

     

Wil jij gratis WordPress tips in je inbox ontvangen?

Wij sturen maximaal 2 e-mails per maand. Beloofd!

Voornaam
Dit veld is bedoeld voor validatiedoeleinden en moet niet worden gewijzigd.