Skip to content

Instantly share code, notes, and snippets.

@SiR-DanieL
Last active Aug 29, 2016
Embed
What would you like to do?
add_action( 'init', 'remove_jpcf_nonadmin' );
function remove_jpcf_nonadmin() {
if ( ! current_user_can( 'manage_woocommerce' ) ) {
remove_action( 'media_buttons', 'grunion_media_button', 999 );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment