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 1b6601a..d49c407 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 @@ -175,11 +175,11 @@ class Wiass_REST_Delivery_Process_API { $entry[self::DECLINE_REASON_FIELD_ID] = $reason; $entry[self::ACCEPTANCE_STATUS_FIELD_ID] = $status; - //submit step - $entry['workflow_step'] = 2; - $entry['workflow_step_status_1'] = 'complete'; - $entry['workflow_step_status_2'] = 'pending'; - $entry['workflow_timestamp'] = time(); + + $gf_api = new Gravity_Flow_API($entry['form_id']); + $current_step = $gf_api->get_current_step($entry); + $current_step->update_step_status('complete'); + $gf_api->send_to_step($entry, $current_step->get_id() + 1); if (GFAPI::update_entry( $entry )){ if ($installation_declined){