remove unused function
This commit is contained in:
@@ -33,22 +33,12 @@ class Wiass_REST_Delivery_Process_API {
|
|||||||
'callback' => array(__CLASS__, 'get_customer_acceptance'),
|
'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(
|
register_rest_route( self::$namespace, 'gravity-form-entry/(?P<entry_id>\d+)', array(
|
||||||
'methods' => 'GET',
|
'methods' => 'GET',
|
||||||
'callback' => array(__CLASS__, 'get_form_entry'),
|
'callback' => array(__CLASS__, 'get_form_entry'),
|
||||||
) );
|
) );
|
||||||
|
|
||||||
|
//Used for testing
|
||||||
register_rest_route( self::$namespace, 'gravity-form-entry/(?P<entry_id>\d+)', array(
|
register_rest_route( self::$namespace, 'gravity-form-entry/(?P<entry_id>\d+)', array(
|
||||||
'methods' => 'PUT',
|
'methods' => 'PUT',
|
||||||
'callback' => array(__CLASS__, 'update_entry'),
|
'callback' => array(__CLASS__, 'update_entry'),
|
||||||
@@ -266,26 +256,13 @@ class Wiass_REST_Delivery_Process_API {
|
|||||||
return self::generate_wiaas_response('NOT_UPLOADED', 'error');
|
return self::generate_wiaas_response('NOT_UPLOADED', 'error');
|
||||||
}
|
}
|
||||||
|
|
||||||
//Used for testing and checking
|
//Used for testing
|
||||||
/*
|
|
||||||
|
|
||||||
|
|
||||||
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
|
|
||||||
public static function get_form_entry($data) {
|
public static function get_form_entry($data) {
|
||||||
return GFAPI::get_entry($data['entry_id']);
|
return GFAPI::get_entry($data['entry_id']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//TODO: Remove this function
|
//Used for testing
|
||||||
public static function update_entry($data){
|
public static function update_entry($data){
|
||||||
$entry = GFAPI::get_entry($data['entry_id']);
|
$entry = GFAPI::get_entry($data['entry_id']);
|
||||||
$new_values = json_decode($data->get_body());
|
$new_values = json_decode($data->get_body());
|
||||||
|
|||||||
Reference in New Issue
Block a user