Looking for help?
< All Topics
Print

How to set fixed price of shipping method on pos

add this code to yourtheme/functions.php or any snippest code + update the method code , price as you want


if(!function_exists('custom_shipping_op_get_login_cashdrawer_data'))
{
    function custom_shipping_op_get_login_cashdrawer_data($session_response_data){

        $shipping_methods = $session_response_data['setting']['shipping_methods'] ;
        
        foreach($shipping_methods as $key => $shipping_method)
        {
            if($shipping_method['code'] == 'flat_rate')
            {
                $shipping_methods[$key]['cost'] = 10;
            }
        }
        $session_response_data['setting']['shipping_methods'] = $shipping_methods;
        return $session_response_data;
    }
}
add_filter('op_get_login_cashdrawer_data','custom_shipping_op_get_login_cashdrawer_data',20,1);
Previous How to separate customer name to First name and Last name ?
Next How to set password for kitchen view
Table of Contents
[elementor-template id="5546"]