Embed Snippet on Your Site
MemberPress: Manually Refresh Member Data
This code snippet is designed to manually refresh all members' data on a WordPress site. After adding the snippet to the site's code, update the member data by adding this to the site's URL
/wp-admin/?update-member-data=true.
This will trigger the update process for all members' data. After running this, you should clear any site cache and check the Members page again to ensure the updates have taken effect
Change the Capability Requirement:
If you want to allow users with a different capability to run this update (not just administrators), modify the line:
current_user_can( 'administrator' )
For example, to allow editors to run the update, change it to:
current_user_can( 'editor' )
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
Comments