PHP Fatal error: Uncaught Error: Call to undefined function litespeed_purge() in WordPress

126 Views Asked by At

I'm getting this(PHP Fatal error: Uncaught Error: Call to undefined function litespeed_purge()) error when I'm trying to call the Lightspeed Cache plugin function.

Here is my code

$pages_to_clear_cache = array(
        'https://www.com/xxx/',
        'https://www.com/yyy/',
    );

    foreach ($pages_to_clear_cache as $page_url) {
        litespeed_purge($page_url);
        litespeed_build_cache($page_url);
    }

Please help me with this.

0

There are 0 best solutions below