Frontend orders/number #13

Merged
bilal.catic merged 53 commits from frontend-orders/number into master 2018-08-29 13:06:02 +02:00
Showing only changes of commit 7541613756 - Show all commits

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(