Hide Web Push Notifications – Webpushr
-
Hello, i want to know how to hide Web Push Notifications – Webpushr Meta Box and Preview Button in Woocommerce for specific user role. My site is a Multi Vendor eCommerce and i dont want Vendors see any Webpushr option.
I tried the following function, but it is not working for webpushr (it works for any other meta boxes from other plugins)
function remove_metaboxes(){
if ( current_user_can( ‘yith_vendor’ ) ) {
remove_meta_box( ‘webpushr-metabox’ , ‘product’ , ‘normal’ );
}
}
add_action(‘add_meta_boxes’,’remove_metaboxes’,50);Is any other way to accomplish what i need?
Or any way to make that Webpushr be shown only for ADMINS.Thanks!
The topic ‘Hide Web Push Notifications – Webpushr’ is closed to new replies.