Title: WP Cron Bug
Last modified: March 29, 2024

---

# WP Cron Bug

 *  Resolved [harryfear](https://wordpress.org/support/users/harryfear/)
 * (@harryfear)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/wp-cron-bug/)
 * Steps to reproduce, invoke WP CRON
 * _Call to undefined function eos\_dp\_get\_option()_
   /wp-content/plugins/freesoul-
   deactivate-plugins/fdp-load.php in eos_dp_update_plugins_slugs_names at line 
   195

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Jose Mortellaro](https://wordpress.org/support/users/giuse/)
 * (@giuse)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/wp-cron-bug/#post-17538808)
 * Thank you [@harryfear](https://wordpress.org/support/users/harryfear/).
 * That function fires only after a plugin is activated or updated.
   Probably when
   you invoke the WP CRON one or more plugins are updated.In any case, the function
   _eos\_dp\_get\_option()_ is defined in the file _wp-content/mu-plugins/eos-deactivate-
   plugins.php_ which is called by WordPress before the file _/wp-content/plugins/
   freesoul-deactivate-plugins/fdp-load.php_ where the error was triggered.This 
   means the file eos-deactivate-plugins.php is not called when you invoke the WP
   CRON which is very strange.
 * Can you please check the file wp-content/mu-plugins/eos-deactivate-plugins.php
   exists?
 * I suppose it exists, in another case, FDP would not be able to disable any plugin.
   So I suspect the files in _wp-content/mu-plugins_ are not called during the WP
   CRON in your case. If confirmed, this would not be a normal behavior.
   Do you 
   have any code that defines a different path for WPMU_PLUGIN_DIR during the WP
   CRON?How do you invoke the WP CRON? Using WP CLI?
 * For me, it would be easy to modify the code in _fdp-load.php_ to avoid the error
   about the undefined function, but it would be better if we first understood what
   is going on, in another case, you could have other issues.
 * Have a great day!
   Jose
 *  Thread Starter [harryfear](https://wordpress.org/support/users/harryfear/)
 * (@harryfear)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/wp-cron-bug/#post-17539571)
 * Howdy Jose,
 * Thanks for the detailed reply.
 * The site doesn’t have any Must Use plugin files and no WPMU_PLUGIN_DIR defined.
   It seems we’re hit a bingo there, as this doesn’t exist:
 * > _wp-content/mu-plugins/eos-deactivate-plugins.php_
 * A missing plugin dependency in the Must Use folder is missing. Is this something
   that can be auto-detected and -healed by the plugin itself? I see no admin warnings
   for the same.
 * I guess the context is a plugin being deactivated before upgrade by an updates
   manager plugin. CRON is enabled in wp-config. I don’t have the CLI in use.
 * Best,
 * Harry.
 *  Plugin Author [Jose Mortellaro](https://wordpress.org/support/users/giuse/)
 * (@giuse)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/wp-cron-bug/#post-17539740)
 * Hi [@harryfear](https://wordpress.org/support/users/harryfear/),
 * when the file wp-content/mu-plugins/eos-deactivate-plugins.php doesn’t exist 
   and you have Freesoul Deactivate Plugins active, you should see an error in the
   FDP backend pages that is very visible, with big fonts.
   Maybe you have some CSS
   in the backend that hides that error.
 * However, without that file, FDP can’t disable any plugin. Hadn’t you noticed 
   FDP was not working? All the plugins should be always and everywhere active without
   that file. This is why I suspected your mu-plugins folder is elsewhere. 
   What
   do you see if you go to Plugins => Installed Plugins?Can you see the link “Must-
   Use”?If you see it and click on that link, can you see **freesoul deactivate 
   plugins [fdp]**?
 * When you activate or update Freesoul Deactivate Plugins, it writes the file eos-
   deactivate-plugins.php into the folder wp-content/mu-plugins.
   So, if you confirm
   that the mu-plugin doesn’t exist, try to deactivate, and then activate again 
   Fresoul Deactivate Plugins.Be careful, you have only to deactivate it, not delete
   it. If you delete it you will lose all the settings.
 * After doing so, can you see the file wp-content/mu-plugins/eos-deactivate-plugins.
   php? Or in Plugins => Installed Plugins => Must-Use, can you see **freesoul deactivate
   plugins [fdp]**?
 * 
   If you still don’t see it, via FTP, create the folder wp-content/mu-plugins,
   and manually copy that file from wp-content/plugins/freesoul-deactivate-plugins/
   mu-plugins/eos-deactivate-plugins.php to wp-content/mu-plugins/eos-deactivate-
   plugins.php.
 * Have a great day!
   Jose
 *  Thread Starter [harryfear](https://wordpress.org/support/users/harryfear/)
 * (@harryfear)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/wp-cron-bug/#post-17539747)
 * Hey Jose!
 * I deactivated and reactivated the plugin, the file was created and the plugin
   interface now loads correctly and all is great.
 * Before doing so, the plugin’s pages were not rendering properly and there were‘
   critical error’ boxes coming up within the UI.
 * Is it possible to enqueue a basic *global* admin notice that warns if the must-
   use file isn’t present?
 *  Plugin Author [Jose Mortellaro](https://wordpress.org/support/users/giuse/)
 * (@giuse)
 * [2 years ago](https://wordpress.org/support/topic/wp-cron-bug/#post-17788757)
 * Hi [@harryfear](https://wordpress.org/support/users/harryfear/)
 * sorry for my late answer. I don’t know why, but I didn’t see the notification
   about your relply.
   Anyway, FDP already shows an admin notice when that file misses.
   Maybe you didn’t see it because of a CSS conflict with another plugin, or because
   the fatal error occurred before that message.
 * Have a great day!
 * Jose

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘WP Cron Bug’ is closed to new replies.

 * ![](https://ps.w.org/freesoul-deactivate-plugins/assets/icon-256x256.png?rev=
   2847508)
 * [Freesoul Deactivate Plugins - Disable plugins on individual WordPress pages](https://wordpress.org/plugins/freesoul-deactivate-plugins/)
 * [Support Threads](https://wordpress.org/support/plugin/freesoul-deactivate-plugins/)
 * [Active Topics](https://wordpress.org/support/plugin/freesoul-deactivate-plugins/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/freesoul-deactivate-plugins/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/freesoul-deactivate-plugins/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [Jose Mortellaro](https://wordpress.org/support/users/giuse/)
 * Last activity: [2 years ago](https://wordpress.org/support/topic/wp-cron-bug/#post-17788757)
 * Status: resolved