I'm currently trying to send an email to my customer after he paid for an order but the email don't gets sent:
add_filter( 'woocommerce_payment_complete_order_status', 'update_order_status', 10, 2 );
function update_order_status( $order_status, $order_id ) {
do_action( 'woocommerce_order_status_pending_to_processing_notification', $order_id );
return 'completed';
}
I need to do this because I want to send the invoice and the payment notification email which is adapted to this filter.
But when I complete an order the email dont gets sent.
The E-Mail I need to sent is activated in the WooCommerce settings: