• Hey,

    we have defined a new role via the plugin “User Role Editor”. For this new role we would like to disable the access to this wonderful “Advanced Order Export For WooCommerce” 🙂

    Is it somehow possible to restrict the access to this plugin?

    All the best
    Pierre

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author algol.plus

    (@algolplus)

    Hi

    revoke capability “view_woocommerce_reports” for this role.

    OR use https://wordpress.org/plugins/adminimize/

    thanks, Alex

    Thread Starter pierrebrezel

    (@pierrebrezel)

    Cool, thx for the fast answer!

    I tried adminimize and deactivated “(Slug: wc-order-export)[__3]” for the new role + all others than administrator. I still see the export order menue item. It worked with some other menue items.

    Do you have any ideas what I do wrong?

    Plugin Author algol.plus

    (@algolplus)

    I don’t know know.
    probably, there is another plugin which modifies wp-admin menu too.

    I suggest to install https://wordpress.org/plugins/user-role-editor/
    and revoke capability “view_woocommerce_reports” for this role.

    Thread Starter pierrebrezel

    (@pierrebrezel)

    hm 🙁 unfortunately the new role needs to see the standard woocommerce reports… any chance for another idea?

    many thanks in advance!

    Plugin Author algol.plus

    (@algolplus)

    hello

    please, adapt this code.
    thanks, Alex

    add_filter( 'woe_current_user_can_export', function($can){
    $user = wp_get_current_user();
    if( in_array( 'administrator', (array) $user->roles ))
    	return false;
    else
    	return true;
    });
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Restrict Access to this plugin’ is closed to new replies.