Forum Replies Created

Viewing 15 posts - 1,846 through 1,860 (of 2,546 total)
  • Author
    Posts
  • in reply to: Default WordPress Filters #2848
    Vladimir
    Keymaster

    Hi Kevin,

    Thanks for the additional information. I reproduced this issue. It’s the bug.
    As we apparently allow just ‘edit-comments.php’ URL under ‘block on not selected’ model URE blocks by default any URLS which differs from ‘edit-comments.php’.

    I should add ‘comment_status’ to the list of allowed parameters for ‘edit-comments.php’. I will do it with the next update to User Role Editor Pro.
    I will let you know when development version with this update will be available for testing. I will try to prepare it until October 10th, 2016.

    Vladimir
    Keymaster

    Thanks for the feedback.

    Vladimir
    Keymaster

    Hi Kevin,

    Thanks for sharing this information.

    in reply to: Default WordPress Filters #2842
    Vladimir
    Keymaster

    Hi Kevin,

    Such problem may appear when you use “Admin Menu Access” add-on to block some menu items. URE thinks that URL with unknown parameters like ‘comment_status’ are prohibited. There is a workaround for this.

    Show me the screenshots what settings you made with “Admin Menu” for the role which is redirected to dashboard when you try to use filtering tabs at the Comments page. I will try to reproduce your situation and recommend a solution.

    Vladimir
    Keymaster

    Try this variant. I removed the “Account Details” from the left menu items too, as it’s the only available my account endpoint and it’s not sense to place the link on the same page.

    
    add_filter('woocommerce_account_menu_items', 'filter_wc_my_account_menu');
    add_action('template_redirect', 'redirect_for_blocked_wc_pages');
    
    function filter_wc_my_account_menu($items) {
        if (!current_user_can('subscriber')) {
            return $items;
        }
        if (isset($items['dashboard'])) {
            unset($items['dashboard']);
        }
        if (isset($items['orders'])) {
            unset($items['orders']);
        }
        if (isset($items['downloads'])) {
            unset($items['downloads']);
        }
        if (isset($items['edit-address'])) {
            unset($items['edit-address']);
        }
        if (isset($items['edit-account'])) {
            unset($items['edit-account']);
        }
        if (isset($items['payment-methods'])) {
            unset($items['payment-methods']);
        }
    
        return $items;
    }
    
    function redirect_from_blocked_url() {
        $my_account_url = wc_get_endpoint_url('edit-account');
        wp_redirect($my_account_url);
        die;    
    }
    
    function check_end_point_url($end_point, $current_url) {
        $blocked_url = wc_get_endpoint_url($end_point);
        if ($current_url==$blocked_url) {
            redirect_from_blocked_url();
        }
    }
    
    function redirect_for_blocked_wc_pages() {
        global $wp, $wp_query;
               
        if (!current_user_can('subscriber')) {
            return;
        }
        
        if (is_account_page() && !is_wc_endpoint_url()) {
            // block Woo My Account Dashboard;
            redirect_from_blocked_url();
        }
                
        $current_url = trailingslashit(home_url($wp->request));
        $blocked_end_points = array('dashboard', 'orders', 'downloads', 'edit-address', 'payment-methods');
        foreach($blocked_end_points as $bep) {
            check_end_point_url($bep, $current_url);
        }
        
    }
    
    in reply to: Where is the capability to close session? #2837
    Vladimir
    Keymaster

    Resolved (discussed via email).
    Update was included into the development version 4.29.

    Vladimir
    Keymaster

    Thanks for the feedback. I will look if it’s possible to change the default page for “My Account”.

    in reply to: Where is the capability to close session? #2834
    Vladimir
    Keymaster

    Got it. Thanks. I will contact you with a solution in 1-2 days.

    in reply to: Where is the capability to close session? #2832
    Vladimir
    Keymaster

    Right. Send that URL to support [at-sign] role-editor.com. I need to see a full structure to take a solution how to resolve this issue.

    in reply to: Where is the capability to close session? #2830
    Vladimir
    Keymaster

    So there is no ‘wp-login.php’ in the logout URL?

    in reply to: Where is the capability to close session? #2827
    Vladimir
    Keymaster

    Yes, it’s exactly that what I asks to show. Thanks.

    I still can not reproduce the issue though.
    Could you check and show me the link from your site for the ‘Log Out’ menu item at top right corner. I suppose the only case when it could be removed by URE Pro – when it was modified somehow from the default value: wp-login.php?action=logout&_wpnonce=…

    in reply to: Cannot load woocommerce #2825
    Vladimir
    Keymaster

    Hi,

    All these WooCommerce Settings page tabs a linked to the URL like
    admin.php?page=wc-settings&tab=
    I do not see page=woocommerce anywhere. WordPress can not find such resource registered and shows the error message ‘can not load …’.

    Try to find why you have the wrong links at these tabs.

    Vladimir
    Keymaster

    Hi,

    Try to install this code as a “must use” plugin. Replace ‘subscriber’ role inside to you own role ID, e.g. ‘candidate’:

    
    add_filter('woocommerce_account_menu_items', 'filter_wc_my_account_menu');
    add_action('template_redirect', 'redirect_for_blocked_wc_pages');
    
    function filter_wc_my_account_menu($items) {
        if (!current_user_can('subscriber')) {
            return $items;
        }
        if (isset($items['dashboard'])) {
            unset($items['dashboard']);
        }
        if (isset($items['orders'])) {
            unset($items['orders']);
        }
        if (isset($items['downloads'])) {
            unset($items['downloads']);
        }
        if (isset($items['edit-address'])) {
            unset($items['edit-address']);
        }
        if (isset($items['payment-methods'])) {
            unset($items['payment-methods']);
        }
    
        return $items;
    }
    
    function check_end_point_url($end_point, $current_url) {
        $blocked_url = wc_get_endpoint_url($end_point);
        if ($current_url==$blocked_url) {
            $my_account_url = wc_get_endpoint_url('woo-account-page');
            wp_redirect($my_account_url);
            die;
        }
    }
    
    function redirect_for_blocked_wc_pages() {
        global $wp;
        
        if (!current_user_can('subscriber')) {
            return;
        }
            
        $current_url = trailingslashit(home_url($wp->request));        
        $blocked_end_points = array('dashboard', 'orders', 'downloads', 'edit-address', 'payment-methods');
        foreach($blocked_end_points as $bep) {
            check_end_point_url($bep, $current_url);
        }
        
    }
    
    in reply to: Where is the capability to close session? #2815
    Vladimir
    Keymaster

    Not yet, I just see that a reason of this problem in URE “admin menu access” module. I need to reproduce this problem to start searching a solution.
    Show a screenshot of “Admin menu access” dialog window for the problematic role. I will try to make the same settings.

    in reply to: Where is the capability to close session? #2813
    Vladimir
    Keymaster

    That’s strange. Please test if ‘Logout’ link will be available if you deactivate (temporary) “Admin menu access” add-on. Will it be shown?

Viewing 15 posts - 1,846 through 1,860 (of 2,546 total)