How can I refresh the plugins cache manually?

I’m installing a plugin by code via an AJAX call and afterwards, I’m using get_plugins to retrieve the new list of plugins.

Problem is, my list is still the old one, where there’s no plugins that are to be activated, it just sits empty, but if I refresh the page and dump my plugin list, it’s there, ready to be activated which shows this is a caching issue.

Using wp_clean_plugins_cache has absolutely no effect.

Read more here:: How can I refresh the plugins cache manually?

Leave a Reply

Your email address will not be published. Required fields are marked *