JWardee
Forum Replies Created
-
Forum: Plugins
In reply to: [Mail logging - WP Mail Catcher] PHP Deprecated ErrorHi Qilin,
has_cap
isn’t used anywhere in the plugin. Could you share the stack trace in your logs so we can see what led up to the error rather than just the error itself. Also what version of WordPress and PHP are you using?Thanks,
JamesForum: Plugins
In reply to: [Mail logging - WP Mail Catcher] emails not to be savedHi @f14m07, I’ve just released version 2.1.9 which should solve your issue. Let me know, if it’s still a problem ??
Forum: Plugins
In reply to: [Mail logging - WP Mail Catcher] emails not to be savedHey guys, @joy0114 your code snippet (pasted below) looks fine to me, I’ve tested this locally and it correctly doesn’t log emails that have “Database Backup” in their description. The only thing I could imagine that could be catching you out is that it’s case sensitive – so “database backup” would still be logged.
add_filter('wp_mail_catcher_before_success_log_save','my_mail_catch_filter');
function my_mail_catch_filter($transformedArgs){
if (str_contains($transformedArgs['subject'], "Database Backup")) {
return false;
}
return $transformedArgs;
}@f14m07, I’ve looked into your issue and I’ve found a bug. I’ll release a fix this weekend and will reply here once it’s out
Forum: Plugins
In reply to: [Mail logging - WP Mail Catcher] emails not to be savedHi @f14m07, yes your example is correct. If a message is sent with a subject of either
XXXXX
orYYYYY
the log will not be saved. Otherwise it’ll proceed as normal.If you’d like more info then an idea would be to take a look at the unit tests for the hook. An example of which can be seen here. You probably couldn’t find references to the hook inside the code as all mentions are prefixed with a namespace. If you search the code for
_before_success_log_save
or_before_error_log_save
you should find them eg hereHope that helps!
Forum: Plugins
In reply to: [Mail logging - WP Mail Catcher] emails not to be savedHey @f14m07, just letting you know that this functionality has been released in v2.1.8 the hook you’ll need is
wp_mail_catcher_before_success_log_save
and the documentation can be found in the “Hooks and actions” section of the plugin page.Forum: Plugins
In reply to: [Mail logging - WP Mail Catcher] How to delete this pluginHi Nicola,
It’s likely been installed as a “must use plugin“. You’ll need to move the plugin from the mu-plugins folder to the plugins folder whereby it’ll appear in the plugins menu as normal allowing you to go through the normal uninstall process.
However I must stress that there’s a risk of you breaking your site if this is done incorrectly. If you’re unsure I’d recommend reaching out to whoever installed it as an mu-plugin.
Because this isn’t a bug with the plugin itself I’m going to close this. I hope this info helps!
Cheers,
JamesForum: Plugins
In reply to: [Mail logging - WP Mail Catcher] emails not to be savedHi @f14m07, currently this isn’t possible but adding a hook to cover this is a nice idea and would also handle some other edge-cases. I’ve added this as a feature request on our GitHub tracker, I’ll aim to roll this out in the next release. Not sure when that’ll be currently but I’ll message back here once it’s available.
I’m going to close this issue here as it’s much easier for me to organise this via GitHub ??
Cheers,
JamesForum: Plugins
In reply to: [Mail logging - WP Mail Catcher] Why am I seeing these Headers?Hey @gauchan, I’m not sure I understand, do you mean that your attached screenshot appears above the table of logs?
It’s likely there’s either another plugin or some custom code is causing this to appear, it would be worth right clicking on the page and going to “inspect element” and taking a look at the console to see if there are any JavsaScript errors that could point you to what’s going on.
I’m going to mark this as resolved as it doesn’t sound like an issue caused by Mail Catcher. But feel free to send more information through and I can log it in our GitHub tracker if it turns out to be a bug with Mail Catcher.
Hope that helps!
Forum: Plugins
In reply to: [Mail logging - WP Mail Catcher] WP Mail Catcher compatibility with WP & PHPHello @hemasusi,
The latest version of the plugin (currently 2.1.6) is compatible with PHP versions greater than 7.4 and the latest version of WordPress. If you notice any issues please do open an issue on our GitHub tracker specifying, PHP version, WP version and any screenshots and steps on how to recreate the issue and I’ll take a look.
Thanks, James
Forum: Plugins
In reply to: [Mail logging - WP Mail Catcher] Prevent emails from sendingHi @kerfred, you could do this without a plugin, because wp_mail is considered a “pluggable” function you can override it with something like:
// Your theme's functions.php function wp_mail($to, $subject, $message, $headers = '', $attachments = array()) { return true; }
I’ve not tested the snippet but it should be enough to get you started. I hope that helps!
Forum: Plugins
In reply to: [Mail logging - WP Mail Catcher] Not working in Multisite?Hey @jules-colle, thanks for getting in touch. This is noted in a GitHub issue, but it isn’t high on my priority list at the moment; simply because there hasn’t been enough demand for it and I have very limited experience with using multi-sites. You are more than welcome to submit a PR to add whatever support is needed and I’ll look over it.
Hope that answers your question! I’m going to mark this as resolved but feel free to respond if you wish and I will get back to you ??
Forum: Plugins
In reply to: [Mail logging - WP Mail Catcher] Not compatible with Docket CacheHey @immuslim, this should be resolved in the latest update (2.1.5)
Hi @tezalsec
Thank you for the suggestion, I’ve added it to our GitHub tracker and will look into it further when I get some time. I’m going to mark this topic as resolved because I track everything through GitHub ??
Thanks again,
JamesForum: Plugins
In reply to: [Mail logging - WP Mail Catcher] Log viewer showing HTML encoded messageHey @scottking, I’ve created an issue on the GitHub tracker for me to investigate this. Can you confirm the exact steps for me to replicate this on a fresh WordPress install? I just want to be sure there are no other plugins/custom code that would interfere with the 2.1.3 update.
I’m going to mark this issue as resolved as I manage everything through GitHub but please feel free to respond either here or on GitHub which ever you prefer.
Thanks,
JamesForum: Plugins
In reply to: [Mail logging - WP Mail Catcher] Not compatible with Docket CacheHi @immuslim,
Thanks for bringing this forward, I’ve created a bug ticket on our GitHub tracker and seeing as it should be a straight forward change we’ll look to resolve this in the next patch – although there is no current timeline on when this’ll be. I’m going to mark this issue as resolved as I handle all issues via GitHub ??
Thanks,
James