Are you sure it’s coming from this plugin? It doesn’t have the load_plugin_textdomain function normally used for translating strings.
Hi Ryan,
Yes, I’m sure it’s coming from this plugin. The notice appears when it’s active and goes away when deactivated. The warning started with WordPress 6.8 which likely added stricter checks on how translations are handled.
Even though the plugin doesn’t explicitly load a text domain, it does use one in class-spam-destroyer.php, line 36:
$this->comment_issues = array(
'hidden-field-not-set' => esc_html__( 'Hidden input field not set', 'spam-destroyer' ),
'wrong-timestamp' => esc_html__( 'Time not set correctly', 'spam-destroyer' ),
'captcha-wrong' => esc_html__( 'CAPTCHA not answered correctly', 'spam-destroyer' ),
'cookie-not-set' => esc_html__( 'Cookie not set', 'spam-destroyer' ),
);
Since the text domain isn’t loaded, WP throws a notice. This can be resolved either by loading the text domain, or just by removing the text domain and using plain strings.
Just wanted to flag it. Cheers.
Ahhh, so it’s now throwing a notice even though the textdomain is not used. That makes sense. Thanks for clarifying.
I’ll add a textdomain to make it stop then.
Hopefully this problem is gone with the latest update.
I included a credit to you in the readme file.
Thanks for finding the bug 🙂
This update was wrong. I’m fixing it now.
Now it should be fixed.
The fix I did earlier, was literally just implementing the translations. But I didn’t realise there was the same notice being triggered in the admin panel as before.
I’m not sure why they’re insisting that translations are done on init, as they work just fine before that. I guess there’s some logic behind it though, just something I’m not thinking of.
Thanks again for informing me about this. It’s not a problem I thought it would crop up.
Hi Ryan,
It works now, thanks for the fix!