Notifications
Clear all

wpForo 1.x.x Flush cache when profile pic is updated

4 Posts
2 Users
0 Likes
495 Views
danniee
Posts: 170
Topic starter
(@danniee)
Reputable Member
Joined: 3 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?

Topic Tags
3 Replies
Chris
Posts: 1640
Admin
(@chris)
Support Team
Joined: 1 year ago

Hi @danniee,

Use this code 

do_action( 'wpforo_update_profile_after', $user );
Reply
danniee
Posts: 170
Topic starter
(@danniee)
Reputable Member
Joined: 3 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.

Reply
1 Reply
Chris
Admin
(@chris)
Joined: 1 year ago

Support Team
Posts: 1640

@danniee,

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

Reply
Share: