Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    if you use this

    add_action( 'save_post_product', 'lscwp_purge_product', 10, 3 );
    function lscwp_purge_product( $post_id) {
    if ( defined( 'LSCWP_V' ) ) {
    do_action( 'litespeed_purge_all' );
    }
    }

    does it work ?

    Best regards

    Thread Starter henrikgda

    (@henrikgda)

    Hi,
    This doesn’t work either.
    Well, it should work but the caches are not getting cleared.
    If I use plugin action (admin) ‘purge all’, it works.
    But not using code API.
    Best regards

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    no , sorry , my bad

    forgot to mention , you need to change “save_post_product” , the product to your custom type , like save_post_block , save_post_quiz …etc

    Best regards,

    Thread Starter henrikgda

    (@henrikgda)

    Hi,

    This is not resolved yet. Because it doesn’t work either.
    It shows the success message but the caches are not getting cleared.

    Maybe it has to do something with the multisite?
    Because on main blog it is getting cleared. But not on other blog.

    Best regards

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Force update cache on updated custom post type’ is closed to new replies.