Support » Plugin: Wordfence Security - Firewall, Malware Scan, and Login Security » Scheduled posts and posts created via XML-RPC do not clear cache

  • When a post is created via xml-rpc or is scheduled for a later date cache is not cleared. This is because the publish_post and publish_page hooks are not used with these instances. publish_future_post and xmlrpc_publish_post are the two hooks you’ll want to add actions too.

    To fix the problem you’ll need to edit /wordfence/lib/wfCache.php and insert these 2 lines.

    This…

    }
    		add_action('wordfence_cache_clear', 'wfCache::scheduledCacheClear');

    Becomes This…

    }
    		add_action('publish_future_post', 'wfCache::action_publishPost');
    		add_action('xmlrpc_publish_post', 'wfCache::action_publishPost');
    		add_action('wordfence_cache_clear', 'wfCache::scheduledCacheClear');

    Hopefully this helps others and is added to the plugin eventually

    https://wordpress.org/plugins/wordfence/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Scheduled posts and posts created via XML-RPC do not clear cache’ is closed to new replies.