[Hummingbird] Clear cache on automatic updates

I have problem where sites are missing css-files after an automatic update. It seems to happen sometimes (not always) when Elementor is updated.
It seems to me to that Hummingbird doesn't not detect file changes.

It would have been great with a option to clear the cache every time upgrades are run.

  • Dimitris
    • Support Star

    Hello there Kjetil Wikestad,

    hope you're doing well and thanks for reaching us! :slight_smile:

    HummingBird already has an option to automatically clear the Page Caching, if a change in the file structure is detected. Please go to HummingBird Pro -> Caching -> Settings and select the "Automatic" option for the "File Change Detection" setting.

    Please do let us know, if this action doesn't resolve the issue with Elementor updates and we'll troubleshoot this further.

    Thank you,
    Dimitris

  • Konstantinos Xenos
    • Rubber Duck Debugger

    Hi Kjetil Wikestad ,

    At the moment Hummingbird doesn't reset cache on "updates" it will reset cache while activating/deactivating plugins or changing between themes. We're already looking into extending this on updates as well.

    Could you please tell me if you're using a single WP installation or a multisite so I can provide a code snippet for you to make it work for updates as well?

    Regards,
    Konstantinos

    • Konstantinos Xenos
      • Rubber Duck Debugger

      Could you please add this on your themes functions.php ( preferably the child-theme ).

      add_action(
      	'upgrader_process_complete',
      	function() {
      		$clearcache = new WP_Hummingbird_Admin_Notices();
      		$clearcache->plugin_changed();
      	},
      	15
      );

      This should trigger the clearing process when an update is complete as well.

      It's triggering properly on my tests but please do confirm from your end as well since some installations might have differences.

      Also keep an eye out for our future releases so whenever we include this features on the release notes you can safely remove this custom trigger as it will be handled by the plugin itself from that point on.

      Regards,
      Konstantinos

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.