• gbruzzo

    (@gbruzzo)


    Hello there

    I noticed that the plugin deletes Homepage, Product and Category cache whenever a Woocommerce order is placed. I understand it may matter if you have stock counters on the page, but it seems too much for us (we have no stock counters on the page).

    I therefore would like to remove the following action in the plugins main php file

    add_action('woocommerce_checkout_order_processed', array($this, 'clear_cache_after_woocommerce_checkout_order_processed'), 1, 1);

    This action is defined in the constructor of the WpFastestCache class, which is instantiated as

    $GLOBALS["wp_fastest_cache"] = new WpFastestCache();

    Could I add the following to functions.php to remove it

    add_action ('init', 'no_clear_cache_wpfc');
    function no_clear_cache_wpfc() {
    remove_action('woocommerce_checkout_order_processed', array($GLOBALS["wp_fastest_cache"], 'clear_cache_after_woocommerce_checkout_order_processed'), 1, 1);
    }

    ?

    • This topic was modified 5 years ago by gbruzzo.
Viewing 1 replies (of 1 total)
  • Plugin Author Emre Vona

    (@emrevona)

    this is good idea ?? you can try it. if it works, please let me know.

Viewing 1 replies (of 1 total)
  • The topic ‘How can I stop Delete Cache after Order’ is closed to new replies.