rename function

This commit is contained in:
GotPPay
2018-08-18 22:11:23 +02:00
parent b54512b187
commit 7541613756

View File

@@ -57,7 +57,7 @@ class Wiass_REST_Delivery_Process_API {
register_rest_route( self::$namespace, 'customer-acceptance/(?P<entry_id>\d+)', array(
'methods' => 'POST',
'callback' => array(__CLASS__, 'update_customer_acceptance'),
'callback' => array(__CLASS__, 'submit_customer_acceptance'),
) );
register_rest_route( self::$namespace, 'customer-acceptance/(?P<entry_id>\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(