Hi Tammo,
EM User here too 🙂
It’s only logical that the sub menu item for coupons is added in the Pro version, otherwise you could never create any coupons (without manually creating it in the SQL database of course) 😉
To remove the submenu item add this to your functions.php:
remove_action('em_create_events_submenu', 'EM_Coupons_Admin::admin_menu',10,1);
Again, you will not be able to create coupons then anymore… You could choose to wrap it in a condition, hiding it for everyone except admin, for example.
if( !is_admin() ){
remove_action('em_create_events_submenu', 'EM_Coupons_Admin::admin_menu',10,1);
}
Additionally, wrapping it in a div would not help much. The WordPress menu is build rather complex. So, all menu items are always enqueued through functions. That way you can remove any unwanted items easily or add items, like a lot of plugin developers do.
For example:
Yoast will create an item in the top bar. And I have created a link to Wordfence’s Live Traffic in the top bar as I use that daily. 🙂
Hi, you seem to be awake 25 hours per day.
Thanks.
It did remove the menu item, but actually I meant the panel in the interface. See image at: https://ibb.co/gsx3jK
Tammo (ook hagenees, maar nu even niet)
Hey stadsgenoot 🙂
Ah, I now see what you mean. Yes… It is added in the coupons-admin.php file on line 36. The devs did wrap the “show coupons” in a div id, but not the h4…
But they do use a function to create that part of the meta box.
Paste this in your functions.php to remove it:
remove_action('em_events_admin_bookings_footer',array('EM_Coupons', 'admin_meta_box'),20,1);
This is great, it works like a charm,
thank you Patrick!