1
votes

I am trying to solve an issue concerning my woocommerce emails. When an order is placed, the "new-order" email for the admin is not sent from my site, yet the customer receives the confirmation. Plus, if I cancel an order from my wordpress, the admin receives the email "order cancel".

After checking a bit on every website, my problem still exists. I was able to set de debug.log file on the ftp and the error that appears is as followed:

WordPress database error Column 'subject' cannot be null for the query INSERT INTO wp_'XXXXXX'_wpml_mails (mail_id, timestamp, host, receiver, subject, message, headers, attachments, error, plugin_version) VALUES (NULL, '2018-05-12 16:37:27', '', '', NULL, '

Is it a problem with WPML (multilingual plugin) or with the server? with woocommerce?

Thanks for any help or advice that could allow me to resolve this problem as it causes a big block into my shop...

1
You should try to translate to English the error message to improve the chances to get help. I'm don't know much about Woocommerce but you got a lot of empty and null values there (One is causing the exception to be thrown). You should check the email settings.RubioRic
Are you able to send normal email via server?Krishnamoorthy Acharya
Actually all emails to the admins are not sent.... Any ideas?Jérémy
@KrishnaKavoor yes I'm able to send emails to the customer and to the admin when someone uses a contact form. thanksJérémy
@RubioRic I set up sendgrid to send my emails. Which settings are you talking about ? The woocommerce emails' settings ? or where else? thanksJérémy

1 Answers

0
votes

I had exactly the same issue, and I've solved it by editing the woocommerce/templates/emails/email-order-details.php file:

in lines 28-34 I've removed the if condition, and left only the part that is within the else. I've started to get admin e-mails again, but the same error message still appear, and the e-mail arrive with no subject.

EDIT: The plugin that is in causing for no subject is WPML Media it's a known issue. You can find the instructions for a work around in this WPML open support ticket as they say, this is a work around until the next WooCommerce Multilingual plugin update will be released.