[X] My issue isn't already found on the issue tracker.
[X] I have replicated my issue using the latest version of the plugin and it is still present.
WordPress version
6.2.1
Cloudflare-WordPress version
4.1.1.0
PHP version
8.1
Expected result
Hi,
I am trying to programmatically purge Cloudflare APO from my plugin, but it's not working.
I have separation for mobile and desktop users enabled on APO.
Is this the correct method to purge everything?
# purge cloudflare APO (requires cloudflare plugin)
if (class_exists('\CF\WordPress\Hooks') && method_exists('\CF\WordPress\Hooks', 'purgeCacheEverything')) {
global $cloudflareHooks;
if ( $cloudflareHooks instanceof \CF\WordPress\Hooks ) {
$cloudflareHooks->purgeCacheEverything();
$ret[] = __( 'Cloudflare Purge Request Sent!' );
}
}
I can see that "Cloudflare Purge Request Sent!" is returned correctly, but the actual page doesn't seem to update, unless I go to the cloudflare plugin and hit purge cache.
Also, how can I purge an array of urls specifically?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Confirmation
WordPress version
6.2.1
Cloudflare-WordPress version
4.1.1.0
PHP version
8.1
Expected result
Hi,
I am trying to programmatically purge Cloudflare APO from my plugin, but it's not working. I have separation for mobile and desktop users enabled on APO.
Is this the correct method to purge everything?
I can see that "Cloudflare Purge Request Sent!" is returned correctly, but the actual page doesn't seem to update, unless I go to the cloudflare plugin and hit purge cache.
Also, how can I purge an array of urls specifically?
Thanks
Actual result
it's not purging
Steps to reproduce
just check my code
Additional factoids
N/A
References
N/A