• Resolved Jonathan Goldford

    (@jg-visual)


    My biggest concern with this plugin is that it sends the email prior to the new comment being approved. Because of this the person who receives the email might not see the new comment and would likely be very confused.

    We rewrote the code slightly to use the wp_set_comment_status hook which allowed us to send the email when a comment was approved. Have you looked into using that hook at all?

    Thanks.

    https://wordpress.org/plugins/comment-email-reply/

Viewing 14 replies - 1 through 14 (of 14 total)
  • Would you mind sharing the rewritten code? I’m trying to figure it out myself but cannot.

    Thanks!

    Thread Starter Jonathan Goldford

    (@jg-visual)

    No problem @eh9116. Here is the code we came up with:

    https://gist.github.com/jg314/a3b0c7e442e3ba283c84

    I hope it’s helpful. Good luck.

    eH9116

    (@eh9116)

    Thanks Jonathan, I appreciate it! But a lot of the code got messed up when you pasted it though…

    Thread Starter Jonathan Goldford

    (@jg-visual)

    Thanks. I noticed that too. If you look at my post now I linked to a gist, which is much easier to read.

    eH9116

    (@eh9116)

    Thanks a lot. I’m testing it out now, but it’s not working. That’s odd. I replaced the code precisely, but now no emails are being sent….

    Thread Starter Jonathan Goldford

    (@jg-visual)

    That’s no good. Did you change the email address listed on line 15 to one within your domain? Otherwise, it might be marked as spam.

    Also, it’s worth mentioning that you have to approve the comment reply before the email will be sent.

    If you’ve done both of those then you may want to talk to your host to make sure the emails aren’t being blocked for some reason.

    Renato Alves

    (@espellcaste)

    I’ve just tested with the Jonathan patch and it’s working great. Have the author responded positively about adding it to the current plugin?

    Plugin Author kilozwo

    (@kilozwo)

    Thanks for delivering this patch. I modified it slightly and introduced it into v1.0.4.

    eH9116

    (@eh9116)

    That’s weird – I still couldn’t get it to work. Thanks for the code though Jonathan! I’m going to try the updated version, hopefully it’ll work!

    Plugin Author kilozwo

    (@kilozwo)

    Jonathans code worked for manually approved comments only I think. I added the functionality for auto-approved comments. Please let me know if it doesn’t work…

    eH9116

    (@eh9116)

    Works great now! I’m sure Jonathan’s code was fine, I’m sure I screwed it up because I was trying to get it to work for automatically approved comments.

    Either way, thanks everyone!

    Thread Starter Jonathan Goldford

    (@jg-visual)

    I’m glad to hear the code was helpful for everyone. @kilozwo, let me know if there is anything else I can do to help.

    As far as building out the plugin, the only other big suggestion I’d have is adding a very simple settings page that allows people to adjust the content of the email, as well as the from name and email address. It would also be awesome if you could send a test email.

    Renato Alves

    (@espellcaste)

    Also an HTML version would be interesting! I still haven’t done it but I’ll have to customize for the website branding and lots of people need it too.

    Plugin Author kilozwo

    (@kilozwo)

    Both suggestions for new functions sounds very good to me. Unfortunately, Im quiet busy at the moment. If anybody of you is willing to modify the code so that a settings page or html-emails will be added, I’m willing to add that to the plugin-code.

    Therefore I uploaded the repo to github:
    https://github.com/kilozwo/Comment-Email-reply/

    Feel free to create a pull-request and the added functionality will be added to the wp plugin directory.

    Thanks for helping improving this plugin…

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Sends Email Before Approval’ is closed to new replies.