Support » Plugin: Gwolle Guestbook » Remove information from e-mail sent to users

  • Resolved MissElenaT

    (@misselenat)


    Hi there,

    thank you for creating this great plugin! I have bought the add-on as well and am so far enjoying it very much.

    I would just like to ask how I can remove the wording “The Add-On” from the e-mail that is sent (when I check the relative option) to the user who has submitted a message, to notify them about an answer being posted by an admin. I have already customized the text of the message on the Settings > Notifications > “Admin Reply mail content” area, but it automatically adds “The Add-On” at the end.

    Thank you very much,
    Elena

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Marcel Pol

    (@mpol)

    Hi Elena,

    You can use this PHP code to remove the text from the mail notifications. I hope the function names are clear enough in which notification they are about. You can choose to disable any of the 4 mail notifications.

    function my_gwolle_gb_addon_mail_notification_metafields_init() {
             remove_filter( 'gwolle_gb_mail_moderators_body', 'gwolle_gb_addon_mail_notification_metafields', 10, 2 );
             remove_filter( 'gwolle_gb_mail_author_body', 'gwolle_gb_addon_mail_notification_metafields', 10, 2 );
             remove_filter( 'gwolle_gb_mail_author_on_admin_reply_body', 'gwolle_gb_addon_mail_notification_metafields', 10, 2 );
             remove_filter( 'gwolle_gb_mail_moderators_report_abuse_body', 'gwolle_gb_addon_mail_notification_metafields', 10, 2 );
    }
    add_action('init', 'my_gwolle_gb_addon_mail_notification_metafields_init', 99);

    Hi Marcel,

    thank you so much for your prompt answer. The code worked like a charm! I picked the third remove_filter string and wrote a test entry, the ‘Add-On’ wording has correctly disappeared from the e-mail that is sent when the author replies.

    I have pasted it at the bottom of the gb-mail file; do I have to keep it handy in order to paste it again after every plugin update, or is there a way not to lose it?

    Thank you again and have a great week ahead!
    Elena

    Plugin Author Marcel Pol

    (@mpol)

    Hi Elena,
    With an update that file will be overwritten.

    Often it can be good to have this code in functions.php of your theme. When you receive updates for your theme, they will be overwritten too. If you receive updates for your theme, you can then use a Child Theme, and put your custom PHP code in functions.php of your child theme.

    An alternative is to have your own plugin (You just need a PHP file with some text headers) where you maintain some custom code like this.

    Hi again Marcel,
    thank you so much for your clarification. I didn’t think about putting it in the functions.php of my theme (I thought I needed a separate functions file for plugins, my bad!), but I will do so immediately, as I’m already using a Child Theme to prevent certain files from being overwritten.

    Once again, I am very grateful for your quick answers and amazing support. I have just written a review and rated the Add-On as well, they are top-quality plugins!

    All the best,
    Elena

    • This reply was modified 2 months, 1 week ago by MissElenaT.
Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.