trustedlogin / Remove-Dashboard-Access

This WordPress plugin limits user access to the dashboard based on whether users have a chosen capability. Disallowed users are redirected to a chosen URL.
https://wordpress.org/plugins/remove-dashboard-access-for-non-admins/
49 stars 12 forks source link

Causing 302 redirect if Paid Memberships Pro is installed #17

Open YousefJSH opened 6 years ago

YousefJSH commented 6 years ago

Requests to be handled by Paid Memberships Pro are being redirected if Remove Dashboard Access is active at the same time.

etlam commented 6 years ago

@YousefJSH Did you find any solution? If yes, could you please share it.

etlam commented 6 years ago

If the plugin sends forms to admin-post.php the request gets redirected. This can be prevented by adding admin-post.php to the list of allowed pages.

Therefor you can use:

function example_callback( $arrayOfAllowedPages = array() ) {
    $arrayOfAllowedPages[] = 'admin-post.php';
    return $arrayOfAllowedPages;
}
add_filter( 'rda_allowed_pages', 'example_callback' );
zackkatz commented 2 years ago

A related issue: https://wordpress.org/support/topic/post-request-to-admin-post-php/