Regards
]]>Customers can order free product vouchers on my site, so I removed payment:
add_filter( 'woocommerce_cart_needs_payment', '__return_false' );
And added autocomplete orders:
add_action( 'woocommerce_thankyou', 'custom_woocommerce_auto_complete_order', 9999 );
function custom_woocommerce_auto_complete_order( $order_id ) {
if ( ! $order_id )
return;
$order = wc_get_order( $order_id );
$order->update_status( 'completed' );
}
but the email to vendors is not sent.
It looks like the status is updated after firing the processing email.
Any idea how to fix this?
Kind regards,
Debby
Hope you can help.
Best regards