Support » Plugin: Booster for WooCommerce » Automatically send invoice

  • laurerl

    (@laurerl)


    Hi,

    I have used this code below to autocomplete orders:

    ////Auto Complete all WooCommerce orders.
    add_action( 'woocommerce_thankyou', 'custom_woocommerce_auto_complete_order' );
    function custom_woocommerce_auto_complete_order( $order_id ) { 
        if ( ! $order_id ) {
            return;
        }
    
        $order = wc_get_order( $order_id );
        $order->update_status( 'completed' );
    }

    But since I put this code, invoices are not send automatically.
    It still create invoice, but there are not send.
    Can you tell me why?

    Thank you
    Laure

  • You must be logged in to reply to this topic.