When using Link with WishList Member logged in users will not be able to add or update their entries. This is because of this code found in the wpm.php
file:
// Do not allow access to Dashboard for non-admins if ($wpm_current_user->ID && basename(dirname($_SERVER['PHP_SELF'])) . '/' . basename($_SERVER['PHP_SELF']) == 'wp-admin/index.php' && !(current_user_can('edit_post') || current_user_can('edit_posts')) && !current_user_can('level_8')) { header('Location:profile.php'); exit; } |
Basically what this code does is if the logged in user is not an admin user, the page is redirected the admin User Profile page. This redirect occurs before Connections admin add/edit functions have an opportunity to run. The fix for this is to reprioritize the the Connections admin add/edit code to run sooner, before the redirect in WishList Member. Here’s how.
Install the Code Snippets plugin and add a new snippet with the following code:
function cn_wishlist_link_compatibility_snippet() { if ( ! current_user_can('edit_posts') ) { remove_action( 'admin_init', array( 'cnAdminFunction', 'init' ) ); add_action( 'init', array( 'cnAdminFunction', 'init' ), 9.9 ); } } add_action( 'plugins_loaded', 'cn_wishlist_link_compatibility_snippet' ); |
Save and Activate the new snippet. Your users should now be able to add and update their entries.
NOTE: This FAQ was written based on WishList Member 2.80.2947