HEX
Server: Apache
System: Linux cp4.skywebbox.com 5.14.0-503.15.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Nov 28 07:25:19 EST 2024 x86_64
User: alfouzantranspor (1054)
PHP: 8.3.23
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/alfouzantranspor/public_html/wp-content/plugins/disable-emails/includes/bootstrap.php
<?php

use webaware\disable_emails\Plugin;
use webaware\disable_emails\PHPMailerMock;

if (!defined('ABSPATH')) {
	exit;
}

require DISABLE_EMAILS_PLUGIN_ROOT . 'includes/functions.php';

// replace standard WordPress wp_mail() if nobody else has already done it
if (!function_exists('wp_mail')) {

	require DISABLE_EMAILS_PLUGIN_ROOT . 'includes/class.EmailAddress.php';
	require DISABLE_EMAILS_PLUGIN_ROOT . 'includes/class.PHPMailerMock.php';

	function wp_mail( $to, $subject, $message, $headers = '', $attachments = [] ) {
		global $phpmailer;

		// create mock PHPMailer object to handle any filter and action hook listeners
		$phpmailer = new PHPMailerMock();
		return $phpmailer->wpmail($to, $subject, $message, $headers, $attachments);
	}

}

/**
 * kick start the plugin
 */
require DISABLE_EMAILS_PLUGIN_ROOT . 'includes/class.Plugin.php';
Plugin::getInstance()->pluginStart();