• Resolved iuriag

    (@iuriag)


    Hello!
    I’m using the plugin with a woocommerce store.
    The products and categories are added/updated from woocommerce Rest Api.
    I found this issue: when you make a post to change only the images, the cache don’t are clear. If I change the description, or other attribute with the new imagens, the cache are cleared.

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

    (@qtwrk)

    Hi,

    maybe you can try this , add to your theme’s functions.php

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

    Best regards,

    Thread Starter iuriag

    (@iuriag)

    Worked, but I have to use this hooks: woocommerce_update_product, woocommerce_new_product!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘force clear cache when product/category updated from woocommerce rest_api’ is closed to new replies.