joacovidal on "[Plugin: WooCommerce MercadoPago] No envía email de nuevo pedido para órdenes pendientes"

ساخت وبلاگ

Hi Claudio,
It suddenly started working. I dont have Ithemes or Cloudfare. I have mod_security but I dont think that was the problem, since I didnt change anything about it.
What I did is including the following code in functions.php, a solution that I found searching in google. Maybe you can include it as an option in the plugin.
//////////////// NEW ORDER EMAIL NOT SENDING FIX
add_action( 'woocommerce_thankyou', 'order_email_workaround' );

function order_email_workaround ($order_id) {
global $woocommerce;
$mailer = $woocommerce->mailer();
// Email customer with order-processing receipt
$email = $mailer->emails['WC_Email_Customer_Processing_Order'];
$email->trigger( $order_id );
// Email admin with new order email
$email = $mailer->emails['WC_Email_New_Order'];
$email->trigger( $order_id );
}

add_action( 'woocommerce_payment_complete', 'order_complete_email_workaround' );

function order_complete_email_workaround ($order_id) {
global $woocommerce;
$mailer = $woocommerce->mailer();
$email = $mailer->emails['WC_Email_Customer_Completed_order'];
$email->trigger( $order_id );
}
//////////////////////////////////

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 88 تاريخ : چهارشنبه 15 ارديبهشت 1395 ساعت: 11:31