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.


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:

    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?



    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.


    Right – so we need to add some more hooks then:

    Could you try to add those to inc/cache_enabler.class.php as shown here?

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


    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”


    Auban le Grelle


    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:


    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.



    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.



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