Looking for help?
< All Topics
Print

Disallow some staff do refund

add this shortcode to yourtheme/functions.php or use snippets code plugin


add_filter('op_get_login_cashdrawer_data',function($session_response_data){
    
    $active_emails = array();
    // add this allow for some staff email only
    // $active_emails[] = 'abc@gmail.com';

    $logged_user_email = $session_response_data['email'];
    if(empty($active_emails) || in_array($logged_user_email,$active_emails))
    {
        $session_response_data['setting']['pos_allow_refund'] =  'no';
    }
    
   
    return $session_response_data;
 },1002,1);
Table of Contents