Support » Plugin: MyCryptoCheckout - Accept 90+ coins: Bitcoin, Ethereum, and more » Add capabilities to setting up to Shop_manager

  • Resolved Identita Creative

    (@identita-creative)


    Hi,
    It’s possible to add capabilities to setting up plugin to Shop manager role?

    Best Regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author edward_plainview

    (@edward_plainview)

    It depends on how one does that, to start off with.

    Could you show me a code example of how one would do that?

    Identita Creative

    (@identita-creative)

    Sure, I try to modify your file menu_trait.php and now works fine.

    // For normal admin.
    		add_menu_page(
    			// Page heading
    			__( 'MyCryptoCheckout Settings', 'mycryptocheckout' ),
    			// Menu item name
    			__( 'MyCryptoCheckout', 'mycryptocheckout' ),
    			'manage_woocommerce', //manage_options
    			'mycryptocheckout',
    			[ &$this, 'admin_menu_tabs' ]
    		);

    I change cap manage_options with manage_woocommerce and now plugin became visible for Shop manager role.

    Plugin Author edward_plainview

    (@edward_plainview)

    Since I don’t want to modify the plugin to only allow for manage_woocommerce, I think the next best option is to add a filter in order to modify the capability, right?

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.