• Resolved graficadora

    (@graficadora)


    Hello,

    The plugin works great, but is causing some email conflict as I detailed next:

    • Is sending duplicate receipt (Order Details) everytime that status order change (even this notification is manually send).
    • Is blocking another emails such as Processing, Complete Order, Notes to Customer, Cancelled Order. And maybe failed orders (not tested).
    • Pre-order admin email is not working.

    Is happening this to someone else? I deactivated my theme and all non-essential plugins and still happens.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Niloy

    (@niloybrightvessel)

    Hi @graficadora ,
    thanks for letting us know about these issues.
    i will check them and let you know the update.
    btw, the last point Pre-order admin email is not working. is only available for the Pro version.

    Apologies if hijacking is frowned upon, but I just wanted to weigh in here with a similar report. In /src/Checkout.php unhook_woocommerce_original_emails(), it unhooks the Customer Note email, so any Customer Notes added won’t go out. I had to comment it out.

    Was it intended to completely stop Customer Note emails going out across the board, and if so, out of curiosity, what was the reason for that?

    Best,
    Dave

    Thread Starter graficadora

    (@graficadora)

    Thanks Niloy, we’ll consider to use the premium version for the site.

    And thanks for your tip Dave, I commented this lines:

    // Unhook and remove WooCommerce default emails.
    // add_action( 'woocommerce_email', [$this, 'unhook_woocommerce_original_emails'] );
    
    // New order notification only for "Pending" Order status
    // add_action( 'woocommerce_order_status_pre-ordered', [$this, 'newPreOderNotification'] );
            
    // add_action( 'woocommerce_thankyou', [$this, 'sendOrderEmail'], 9999, 1 );
    
    // $email_customer_invoice = WC()->mailer()->get_emails()['WC_Email_Customer_Invoice'];

    And as far as I tested is working perfect ??
    Stopped sending the duplicate receipt, and now the client is receiving the rest of emails (Processing, Complete Order, Notes to Customer). Not Cancelled is not sending though (admin notification).

    Hi graficadora,

    If the Cancelled email is enabled, just make sure you’re not removing the action elsewhere (like in your functions.php) or if any plugins are doing it. If you go to /woocommerce/includes/class-wc-emails.php and find the function (on 166 at the time of writing) send_transactional_email, before the call to do_action_ref_array (line 170 at the time of writing), put in the following (crude but effective):

    if ($_SERVER['REMOTE_ADDR'] === "your ip address"){
    				echo '<strong>' . current_filter() . '_notification</strong> has action:<br>';
    				var_export(has_action(current_filter() . '_notification'));
    			}

    You can also choose to mail yourself the output instead of echoing it, but restricting it to your IP will mean it won’t affect your customers. You should then trigger a Cancelled email on a test order and you should see the output.

    Best,
    Dave

    Niloy

    (@niloybrightvessel)

    Hi @davethedon ,
    Thanks for your query.

    the original WooCommerce emails are conflict with the preorder logic.
    Hooks for sending emails during store events – After more testing, this can be removed if it doesn’t conflict with the logic.

    so, if you found that those hooks are not in conflict with preorder logic you can simply comment them. we will also test it and remove those lines if we found that not conflict.
    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Email notification problems’ is closed to new replies.