• Resolved Shayan Emami

    (@zagool)


    Hello and thanks for you great plugin.
    im using Product Bundle plugin and every thing is working expect if you create a bundle product, then change the bundle ( for example add, remove or change a product in the bundle ) and update the product, website will show the cached version (old) and you should remove all the cache to actually see the latest version of the product.

    • negahfashion.com
    • 1. create a bundle product
    • 2. add, remove or update one of the product in the bundle
    • 3. update the product
    • 4. you will see the old version
    • 5. remove cache and the problem will resolve
    • Report number: VFSNEHWZ
    • Other Information:?You cant actually see any bundle product on my website right now, im waiting for the problem to get fix.

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

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

    (@qtwrk)

    please contact the bundle product support and kindly ask if their plugin have any action we can hook to our purge API.

    Thread Starter Shayan Emami

    (@zagool)

    Hi @qtwrk i contact them and they sent me this :

    add_action( 'woocommerce_product_bundle_updated', 'purge_litespeed_cache' ); function purge_litespeed_cache( $bundle_id ) { // Add your code here to purge the LiteSpeed Cache }

    Plugin Support qtwrk

    (@qtwrk)

    What’s in that $bundle_id ?

    I mean it’s a single integer number as product id or array come with bunch of products IDs as bundle or something?

    Thread Starter Shayan Emami

    (@zagool)

    i guss it should be a single product, becuase product bundle, create a single product that only shows related products in one page. so it should be a single id, like the main product id.

    Thread Starter Shayan Emami

    (@zagool)

    let me take a look at source code, i will post it here for you

    Thread Starter Shayan Emami

    (@zagool)

    I Checked Database it was a BIGINT, also if you check source code, its only an id just like a normal product id as far as i understand.

    for example : $bundle_id ? ?= $this->product->get_id();
    this is what i found in their source code.

    Also i should mention that, a bundle product is just another woocommerce product type ( like virtual, physical etc )
    we can hook the purge function to normal woocommerce product update if it was a bundle i guss.

    but what my consern is why its caching the detail in the first place, and its not caching normal woocommerce product.

    Plugin Support qtwrk

    (@qtwrk)

    Nice, that just make things easy

    Please try

    do_action( 'litespeed_purge_post', $bundle_id);
    Thread Starter Shayan Emami

    (@zagool)

    add_action( 'woocommerce_product_bundle_updated', 'purge_litespeed_cache' );
    function purge_litespeed_cache( $bundle_id ) {
    do_action( 'litespeed_purge_post', $bundle_id);
    }

    You Mean like this ?

    Plugin Support qtwrk

    (@qtwrk)

    yes yes

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Litespeed Cache And Product Bundle Plugin’ is closed to new replies.