Notifications
Clear all

wpForo 1.x.x [Closed] Flush cache when profile pic is updated

4 Posts
2 Users
0 Reactions
868 Views
Posts: 389
Topic starter
(@danniee)
Honorable Member
Joined: 5 years ago

Hi,

I use a plugin called comment widget plus. Whenever I change my profile pic it's updated fine everywhere except in that widget. I think I need to make that plugin flush cache when a new profile picture is uploaded. I have found the following code in the plugin:

// Flush cache
add_action('comment_post', array($this, 'flush_widget_cache'));
add_action('edit_comment', array($this, 'flush_widget_cache'));
add_action('transition_comment_status', array($this, 'flush_widget_cache'))

And I tried adding Wordpress actions, but that did not help:

add_action('edit_user_profile_update', array($this, 'flush_widget_cache'));
add_action('personal_options_update', array($this, 'flush_widget_cache'));

So I figured maybe wpforo uses its own actions that I need to add instead to make it work?

3 Replies
Chris
Posts: 3627
(@chris)
Famed Member
Joined: 3 years ago

Hi @danniee,

Use this code 

do_action( 'wpforo_update_profile_after', $user );
Posts: 389
Topic starter
(@danniee)
Honorable Member
Joined: 5 years ago

I really thought that would work but it didn't :/

Seems like it's more complex than this. I use Redis, so I suspect I need to exclude that plugin from being cached by Redis.

1 Reply
Chris
(@chris)
Joined: 3 years ago

Famed Member
Posts: 3627

@danniee,

If you're using caching plugin, also exclude wpForo to get reed of further problems.