When I try to send a test email from the Messages Template portion of the plugin, I get this error:
An error of type E_ERROR was caused in line 24 of the file E:\web\...\wp-content\plugins\newsletter\subscription\template.php. Error message: Uncaught Error: Call to a member function get_test_users() on string in E:\web\...\wp-content\plugins\newsletter\subscription\template.php:24
Stack trace:
#0 E:\web\...\wp-content\plugins\newsletter\includes\module-admin.php(178): require()
#1 E:\web\...\wp-includes\class-wp-hook.php(310): NewsletterModuleAdmin->menu_page('')
#2 E:\web\...\wp-includes\class-wp-hook.php(334): WP_Hook->apply_filters('', Array)
#3 E:\web\...\wp-includes\plugin.php(517): WP_Hook->do_action(Array)
#4 E:\web\...\wp-admin\admin.php(259): do_action('admin_page_news...')
#5 {main}
thrown
i tried debugging it myself, it looks like $module is getting set to a string at line 166 in module-admin.php, $module = $this->sanitize_file_name($parts[1]);
, which i suspect is the cause but not sure.
EDIT: i was able to fix it, at least for now. $module comes up twice in template.php. i replaced the first instance of $module with NewsletterSubscriptionAdmin::instance()
and the second instance with NewsletterSubscription::instance()
. this keeps them as objects instead of strings which is what template.php was getting from $module, for whatever reason. that got the test emails to send, hopefully it doesn’t affect normal newsletter usage.