remove unused function

This commit is contained in:
GotPPay
2018-08-20 12:53:09 +02:00
parent 902df8760b
commit b49c1cb82d

View File

@@ -33,22 +33,12 @@ class Wiass_REST_Delivery_Process_API {
'callback' => array(__CLASS__, 'get_customer_acceptance'),
) );
/*
Used for some fast test and check
register_rest_route( self::$namespace, 'gravity-form-entry/(?P<entry_id>\d+)/field/(?P<field_id>\d+(.\d+)?)', array(
'methods' => 'GET',
'callback' => array(__CLASS__, 'get_field_value_from_entry'),
) );
*/
register_rest_route( self::$namespace, 'gravity-form-entry/(?P<entry_id>\d+)', array(
'methods' => 'GET',
'callback' => array(__CLASS__, 'get_form_entry'),
) );
//Used for testing
register_rest_route( self::$namespace, 'gravity-form-entry/(?P<entry_id>\d+)', array(
'methods' => 'PUT',
'callback' => array(__CLASS__, 'update_entry'),
@@ -266,26 +256,13 @@ class Wiass_REST_Delivery_Process_API {
return self::generate_wiaas_response('NOT_UPLOADED', 'error');
}
//Used for testing and checking
/*
public static function get_field_value_from_entry($data){
//TODO : check for permissions
$entry = GFAPI::get_entry($data['entry_id']);
$result = $entry[$data['field_id']] ?: '';
return new WP_REST_Response ($result);
}
*/
//TODO: Remove this function
//Used for testing
public static function get_form_entry($data) {
return GFAPI::get_entry($data['entry_id']);
}
//TODO: Remove this function
//Used for testing
public static function update_entry($data){
$entry = GFAPI::get_entry($data['entry_id']);
$new_values = json_decode($data->get_body());