• Resolved blackeye0013

    (@blackeye0013)


    Hi,

    I’ve just found your plugin and after several hours of testing, I’m quite impressed by its simplicity and versatility.

    Just one question: is it possible to disable it by default and enable it just for certain plugins?

    All my front-end forms are serviced by Caldera Forms and these are basicaly only ones I want to use templates for. I don’t need to use them for admin emails or emails sent by other plugins which use their own styling, e.g. security reports by iThemes Security (but I haven’t tested it for possible issues yet).

    To make it short, for peace of my mind, I would be much happier to have an option to enable your plugin only for emails sent by Caldera.

    Thanks in advance

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support Julian

    (@juliangk)

    Hello blackeye0013,

    you could regulate your outgoing e-mails by “subjects” for example, and deactivate all e-mail templates with certain subjects, as explained here, in the FAQ:

    https://de.ww.wp.xz.cn/plugins/wp-html-mail/#how%20to%20disable%20the%20template%20for%20some%20emails%3F

    Best regards

    Julian

    Thread Starter blackeye0013

    (@blackeye0013)

    Hi Julian,

    yes I could do that, but then I’d had to know every Caldera form’s email subject or another property. I have like 10 Caldera forms and the subjects can be changed by editors. Editors can add whole new forms too. This approach would be quite hard to maintain.

    Also I feel it’s not very effective workaround, it’s another condition which wouldn’t be necessary.

    Moreover, I feel it is almost done. You can enable/disable sending by Caldera (or by any other plugin), it would be just nice to have an option to enable/disable WP HTML Mail itself globally too.

    If it’s not possible ok, but is there at least an attribute in $mail for sender plugin? Than I could use something like if ($mail['sender'] = 'Caldera') {...}.

    Thanks again
    Petr

    Hi @juliangk ,

    I completely agree with @blackeye0013 on this one.

    I have emails where the senders can amend the subject lines, there is just nothing to hold on to. The solution you provide works in simple cases, but it’s a bit clunky.

    It would be great to be able to switch off the template by ‘plugin’, so something similar to what Petr suggests above.

    Plugin Support Julian

    (@juliangk)

    Hello Joe,

    I am not sure what exactly it is that you are suggesting, but in the “Plugins” tab of our plugin, you can deactivate the template by “plugin” already.

    This option already is available.

    Best regards
    Julian

    Hi @juliangk ,

    Thanks for your reply. I know about that ‘Plugins’ tab, but that doesn’t exactly work.

    I don’t have a Woocommerce extension, yet still your plugin is adding a template into all my Woocommecrce emails, so I’m removing the template based on the subject.

    But the same is for ‘WP Job Manager’ plugin for example. This is not even on your plugin tab list.

    As well as BuddyPress for example.

    Your plugin basically adds the template into any email that is sent by WP.

    So what I’m suggesting, as well as what @blackeye0013 is suggesting as I believe, to have an option to exclude the template based on a ‘plugin’ rather than a ‘subject’.

    So rather then writing a function if($mail['subject'] == for example, it would be good to have something like:

    IF plugin is 'WP Job Manager' then don't use the email template

    I hope it makes sense.

    Hey @joe-bloggs
    I’m the lead developer of the plugin
    your suggestion absolutely makes sense, that’s what we also want to have, but there is no way to generally know which plugin has sent the email. Each of our integrations listed on the “plugins” tab uses other tricks to detect the sender plugin.

    For BuddyPress we have a free add-on here in the WordPress plugin repo https://ww.wp.xz.cn/plugins/wp-html-mail-buddypress/

    WP Job Manager is not on our roadmap so far but it seems quite popular so I’m going to add it right now.

    Thread Starter blackeye0013

    (@blackeye0013)

    Hi to all, especially to @haet as a lead developer.

    My suggestion was a bit different. I’d like to have the option to disable the templates globally and enable it only on plugin basis.

    Now by default all emails are sent using the template, unless they are disabled on plugin basis. The problem is, that the number of supported plugins (which can be turned off) is limited, thus the templates are used even when not desired. As Hannes said, you cannot know which plugin is sending the mail, so you have to use different tricks. But why not to turn the logic around and have an option to use templates only for plugins their support is listed.

    From a user’s point of view it would be enought to add an option to disable templates completely (similarly as for the plugins) and the rest leave as it is. But I can understand that underneath it could be complicated.

    Thanks

    Hey @haet
    Many thanks for your answers, I really appreciate that and I understand what you’re saying. Also, thanks for looking into the WP Job Manager.

    @blackeye0013 I understand your point, it makes sense, but I think your case might be a little different.

    The whole point of the WP HTML Email plugin, and I believe what it was created for, is that it adds a template to ALL WP emails. Including the ugly WP system emails, such as Welcome New User, Forgotten Password or other default WP emails.

    And this works great, but what it also does as a ‘side effect’ is that it adds a template to ALL other emails even where you don’t want it. If the plugin is not on the ‘plugins’ list, it can’t be turned off. (it can but only using the function)

    And I agree with @blackeye0013 , the plugins list is limited.

    Woocommerce is extra annoying, because although Woocommerce is on the plugins list, I still can’t turn off the template.
    I know that there’s an additional extension for WOO, but if you decide you don’t want the extra extension and you just want to stick to the default WOO emails, there is no way to turn the template off. (other than the suggested functions based on subject for example)

    So as a result, it also adds a template into WOO emails and it creates this ugly top and bottom margin on each email and there is just no way to get rid off it.
    Same with WC Job Manager or other plugins not on the list, the template adds a margin to the top and bottom.

    @blackeye0013 But what you want is to basically switch off the template completely and then only activate it based on a single plugin.

    It makes sense, but In you case, as you mentioned Caldera forms, can’t you just look into editing the individual Caldera email template file instead?
    Or Caldera even has an extension for that, see here: https://calderaforms.com/downloads/mail-templates/

    @haet I don’t really know how this is technically possible, but here is an idea. Is there any way to dynamically detect what emails are being sent from the website including all emails sent by installed plugins?

    If that’s possible, you could have another tab for emails. This would give a complete list of ALL emails that are detected to be sent by the website.
    You could then use tickboxes and tick or untick to choose emails to apply the template to.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Disable Plugin by Default, Enabling it Only for Specific Plugins’ is closed to new replies.