This commit is contained in:
Javier Casares 2026-02-18 16:06:17 +00:00
commit d611209171
5 changed files with 35 additions and 10 deletions

View file

@ -74,9 +74,20 @@ if ( ! file_exists( $wp_load_path ) ) {
require_once $wp_load_path;
// Verify plugin is active.
// Load plugin if not already loaded (happens in DOING_CRON context)
if ( ! defined( 'ROBOTSTXT_SMTP_NEWSLETTER_VERSION' ) ) {
fwrite( STDERR, "Error: Newsletter SMTP plugin is not active\n" );
$plugin_file = __DIR__ . '/robotstxt-smtp-newsletter.php';
if ( file_exists( $plugin_file ) ) {
require_once $plugin_file;
} else {
fwrite( STDERR, "Error: Newsletter SMTP plugin file not found\n" );
exit( 1 );
}
}
// Verify plugin loaded successfully
if ( ! defined( 'ROBOTSTXT_SMTP_NEWSLETTER_VERSION' ) ) {
fwrite( STDERR, "Error: Newsletter SMTP plugin could not be loaded\n" );
exit( 1 );
}