Skip to content

Run setup() on plugins_loaded instead of after_setup_theme #716

Closed
@raamdev

Description

@raamdev

Comet Cache currently hooks its setup routine into after_theme_setup, which runs after plugins_loaded.

Other plugins that integrate with Comet Cache might hook into plugins_loaded to make API calls like comet_cache::clear(), which would currently fail with a fatal error because the setup routine hasn't been run yet:

PHP Fatal error: Uncaught exception 'Exception' with message 'Missing base_dir option value.'

We should take a closer look at this and use the plugins_loaded hook instead if possible.


Referencing: https://wordpress.org/support/topic/clearing-cache-from-autoptimize-base_dir-option

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions