Support » Plugin: Cache Enabler - WordPress Cache » Woocommerce variation update not clear post cache

  • Hello,

    With woocommerce on product variation update the cache for the post is not clear.

    Regards,
    Auban

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello Auban,

    starting with the last release Cache Enabler should automatically clear the cache when stock changes:
    https://github.com/keycdn/cache-enabler/commit/d4d210e79a99984c37710e9cb238643517114055

    Do you have the “Clear the complete cache if a new post has been published” option checked? If not, could you give it a try to see if that works?

    Cheers!

    Hello,

    Thanks for your reply.
    I have installed the last release.

    But the hook for update stock variation is “woocommerce_variation_set_stock_status” and “woocommerce_variation_set_stock”

    For update price on variation the cache is not clear.

    Regards
    Auban

    Right – so we need to add some more hooks then:
    http://woocommerce.wp-a2z.org/oik_api/wc_product_data_store_cpthandle_updated_props/

    Could you try to add those to inc/cache_enabler.class.php as shown here?
    https://github.com/dramaturg/cache-enabler/commit/3db751048a49e3731cb3ed8bced596a6ae0eeeec

    Let us know if that works for you – we’ll then add it to the next release.

    Hello,

    Yes it works.
    But not if i change others in variation.
    Is it possible to add this hook for all save variation “woocommerce_save_product_variation”

    Regards,

    Auban le Grelle

    Hello,

    I have add more features.

    = 1.3.2
    * Add support clear cache woocommerce variation.
    * Add archive page clear cache by post id.
    * Add option clear all on woocommerce stock update otherwise only product.
    * Add support clear cache for WPML.
    * Add param url on action “ce_action_cache_by_url_cleared”
    * Add params post id and permalink on action “ce_action_cache_by_post_id_cleared”

    You can see here: https://github.com/RedCastor/cache-enabler

    Regards,
    Auban

    Hello Auban,

    that looks awesome! Could you create a pull request so we can then review and merge your changes?

    I’ve also noticed that you replaced a lot of spaces with tabs – you should undo that as we use spaces everywhere and it makes reviewing the changes very difficult. (all those lines will show up as changed)

    Once you created the pull request we will walk through the changes and carefully test them so that might take a bit of time.

    Cheers,
    Sebastian

    Hello,

    I work now on a better solution to clean cache for full support wpml and woocomerce.

    Without change a lot in the current version but in additional classes.

    Regards,

    Auban

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Woocommerce variation update not clear post cache’ is closed to new replies.