Advertisement
palsushobhan

wcfm-disallow-add-delivery-person.php

Dec 24th, 2021
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.52 KB | None | 0 0
  1. add_filter('wcfm_is_allow_manage_delivery_boys', function($is_allowed) {
  2.     if(wcfm_is_vendor()) {
  3.         return false;
  4.     }
  5.     return $is_allowed;
  6. });
  7.  
  8. add_filter('wcfm_add_new_delivery_boy_sub_menu', function($is_allowed) {
  9.     if(wcfm_is_vendor()) {
  10.         return false;
  11.     }
  12.     return $is_allowed;
  13. });
  14.  
  15. add_filter( 'wcfm_menus', function($menu) {
  16.     if(wcfm_is_vendor() && isset($menu['wcfm-delivery-boys'])) {
  17.         unset($menu['wcfm-delivery-boys']['has_new']);
  18.     }
  19.     return $menu;
  20. }, 301 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement