From 75416137565fff1e12dc13546ad9edddfc91d0bc Mon Sep 17 00:00:00 2001 From: GotPPay Date: Sat, 18 Aug 2018 22:11:23 +0200 Subject: [PATCH] rename function --- .../includes/api/class-wiaas-rest-delivery-process-api.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/backend/app/plugins/wiaas/includes/api/class-wiaas-rest-delivery-process-api.php b/backend/app/plugins/wiaas/includes/api/class-wiaas-rest-delivery-process-api.php index 514d144..f33dd17 100644 --- a/backend/app/plugins/wiaas/includes/api/class-wiaas-rest-delivery-process-api.php +++ b/backend/app/plugins/wiaas/includes/api/class-wiaas-rest-delivery-process-api.php @@ -57,7 +57,7 @@ class Wiass_REST_Delivery_Process_API { register_rest_route( self::$namespace, 'customer-acceptance/(?P\d+)', array( 'methods' => 'POST', - 'callback' => array(__CLASS__, 'update_customer_acceptance'), + 'callback' => array(__CLASS__, 'submit_customer_acceptance'), ) ); register_rest_route( self::$namespace, 'customer-acceptance/(?P\d+)/upload-file' , array( @@ -151,7 +151,7 @@ class Wiass_REST_Delivery_Process_API { return new WP_REST_Response($result); } - public static function update_customer_acceptance($data){ + public static function submit_customer_acceptance($data){ if (!is_user_logged_in()){ return self::generate_error('You don\'t have permission to read this entry', 401); } @@ -300,9 +300,6 @@ class Wiass_REST_Delivery_Process_API { return new WP_REST_Response ($result); } - - - //Helper function private static function generate_error($message, $code = 500){ $error = array(