wc_mail in foreach loop is sending only the first email

You use include_once in praga_emails_after_order() method therefore files (templates: email-confirm.php, email-admin.php, email-proveedor.php) will be included only in the first iteration.

Try to use include instead of include_once, it’s possible that next emails are not sent because of empty content.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)