• Resolved libormachac

    (@libor2001)


    Hi, is there any option how can i disable purging categories (main category and sub categories) after adding products? We have setup auto purge whole website at midnight so every category and product are updated at midnight so there is no outdated content to be displayed and we want to have cached site all day. And new products can be added next day.
    Thanks for help and have a nice day.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 16 through 18 (of 18 total)
  • Plugin Support qtwrk

    (@qtwrk)

    add_action('woocommerce_new_product', 'lscwp_suppress_purge_product_update', 10, 2);
    function lscwp_suppress_purge_product_update($product_id, $product) {
    ob_start( function($buffer) use ($product_id) {
    @header("X-LiteSpeed-Purge: nothing" );
    return $buffer;
    } );
    }

    please add this as well

    Thread Starter libormachac

    (@libor2001)

    Hi, i have been trying this code for a while. Sometimes it works as we want but last days, the code did purge again categories and products. I dont know why and im completaly lost in this situation.

    Plugin Support qtwrk

    (@qtwrk)

    please try grab the log ,maybe something else did purge

Viewing 3 replies - 16 through 18 (of 18 total)
  • You must be logged in to reply to this topic.