WordPress.org

Ready to get started?Download WordPress

Forums

wpMandrill
[resolved] ManDrill and Woocommerce (15 posts)

  1. matt solomon
    Member
    Posted 1 year ago #

    Hello,

    Does this intergrate with woocommerce? :)

    http://wordpress.org/extend/plugins/wpmandrill/

  2. MC_Will
    Member
    Plugin Author

    Posted 1 year ago #

    Yes it does!

  3. mitchell360
    Member
    Posted 1 year ago #

    Here is the issue that we have. WordPress standard emails (password reset, etc.) are plain-text-ish with /n/r code. They look better when we check "Replace all line feeds ("\n") by
    in the message body"

    Woocommerce sends nice HTML. They look worse when we check "Replace all line feeds ("\n") by
    in the message body"

    What is your recommendation to address this either/or condition?

  4. MC_Will
    Member
    Plugin Author

    Posted 1 year ago #

    The best way will be to identify either WordPress or Woocommerce emails (tags will be your friends here) and then parse the body content in any way you want depending if they should have \n\r replaced or not.

    You should add this function to the mandrill_payload filter, obviously.

    I hope it helps,
    Will

  5. Chirag Vora
    Member
    Posted 1 year ago #

    Do I need to add mandrill_payload in functions.php of child theme?

  6. Chirag Vora
    Member
    Posted 1 year ago #

    Alright, I found some information in How-Tos section within of Settings => wpMandrill

    There is an example for "cart66 Lite Ecommerce plugin" given there. But I cannot understand how to implement it for WooCommerce. I've submitted a ticket to WooCommerce and also left a message at Mandrill. Hope one of them will gives an explanation on "Configuring WooCommerce and wpMandrill the right way!"

    I would like to hear from anyone of you, if you already did it.

  7. MC_Will
    Member
    Plugin Author

    Posted 1 year ago #

    Hello Chirag740,

    I'm not sure what do you need, exactly. WooCommerce works out of the box with wpMandrill. I just installed both plugins in a vanilla wp installation, added a WC product, purchased it and all emails I got where sent through Mandrill.

    In my Mandrill Dashboard I could see that the emails sent by this plugin are tagged as 'wp_WC_Email->send' so that's the tag name you should use in your webhook function if you want to customize them.

    If you still have problems, I think it would be better to contact us directly so we can troubleshoot from there.

    Good luck!

  8. Chirag Vora
    Member
    Posted 1 year ago #

    Thanks, MC_Will it works as you described "out of the box".

  9. Tareq Hasan
    Member
    Posted 1 year ago #

    This should fix the problem

    function wd_mandrill_woo_order( $message ) {
        if ( in_array( 'wp_WC_Email->send', $message['tags']['automatic'] ) ) {
            $message['html'] = $message['html'];
        } else {
            $message['html'] = nl2br( $message['html'] );
        }
    
        return $message;
    }
    
    add_filter( 'mandrill_payload', 'wd_mandrill_woo_order' );
  10. MC_Will
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Tareq,

    Just make sure the process inside that function really does what you need it to do with your message. That sample code is just, well, a basic sample.

    Something more useful would be, for instance, to change the Mandrill Template to use for WooCommerce emails.

  11. Tareq Hasan
    Member
    Posted 1 year ago #

    Although it's a basic solution and it works for me.

    You get the WooCommerce order email as HTML in $message['html'], so I am not sure how you'll handle using template.

  12. Chirag Vora
    Member
    Posted 1 year ago #

    @Tareq you mean to say this will apply to order emails (only)?

  13. Jon-B
    Member
    Posted 10 months ago #

    Thanks Tareq,

    It seems to work, though only if you aren't using a template. I guess the best situation then is to customise the WC templates individually rather than trying to use MailChimp / Mandrill templates.

    Then just save using templates for Mailchimp newsletters. Not the ideal set up but at least it works.

    Hopefully more implementation documentation and options will get created going forward, the plugin does still suggest it is in beta and I'm liking it so far.

  14. sethneal
    Member
    Posted 9 months ago #

    @MC_Will thank you for this plugin!! Had it setup and running in 10 minutes! And now our emails from woocommerce ACTUALLY go to people's inboxes. Amazing. Haha!

  15. jenni17
    Member
    Posted 8 months ago #

    Hello, if someone can please help me. WordPress standard emails are sent through Mandrill but Woocommerce email notificacion aren't. Why is this happening?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.