Hi,
thanks Hunter.
I try to add this with the plugin “WooCommerce – Autocomplete Orders”.
now in the events ticket plus I don’t have flag “Try to set the status of new ticket orders to “complete” automatically” but I add the code to the functions.php
/**
* 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' );
}
And now it works.
Is it the right mode or I have to flag “Try to set the status of new ticket orders to “complete” automatically” in the ticket options?
thanks