I have a working wordpress cron, that is executing as expected. Inside the cronjob I want to use the action plugins_loaded.

     * Daily event.
    public function run_daily_delete_event() {
        // $this->filter_on_plugins_loaded();
        add_action( 'plugins_loaded', array(&$this, 'filter_on_plugins_loaded' ) );

However it seems the action is never executed?

Background: Other plugins are using add_filter with a custom action where as the cronjob excutes apply_filter.

What could be another way to execute a function in a cronly manner and work well with the plugins_loaded action?

  • 1
    Why do you need to use the plugins_loaded action? That action would have already fired by the time the cron hook is fired. – Jacob Peattie Jun 15 at 9:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.