PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 3.3.1
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v3.3.1
3.3.1 V-3.3.0 3.2.2 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 V3.0.3 V3.0.2 -3.0.1 V_3.0.0 1.1.1 1.1.8 1.2 1.3 1.4 1.4.18 1.5.2 1.9 2.0 2.10.0 2.10.1 All 138 releases
← All changes | includes/Core/Migration/Migration.php +13 -5 2.03.3.1 View file →
@@ -2,17 +2,20 @@
2 2
3 3 namespace BitCode\BitForm\Core\Migration;
4 4
5 5 // create class for migration
6 -final class Migration {
6 +final class Migration
7 +{
7 8 private $_formData;
8 9
9 - public function __construct($data) {
10 + public function __construct($data)
11 + {
10 12 $this->_formData = $data;
11 13 }
12 14
13 15 // create function for migration
14 - public function migrate() {
16 + public function migrate()
17 + {
15 18 $formData = $this->_formData;
16 19
17 20 $formData->form_content = self::convertFormContent($formData->form_content);
18 21 $formData->workFlows = WorkFlows::migrate($formData->workFlows);
@@ -19,9 +22,10 @@
19 22 $formData->formSettings = self::convertFormSettings($formData->formSettings);
20 23 return $formData;
21 24 }
22 25
23 - public function convertFormContent($formContentV1) {
26 + public function convertFormContent($formContentV1)
27 + {
24 28 $formContenV2 = $formContentV1;
25 29
26 30 if (isset($formContentV1->fields)) {
27 31 $formContenV2->fields = MigrationHelper::convertFields($formContentV1->fields);
@@ -32,12 +36,16 @@
32 36
33 37 return $formContenV2;
34 38 }
35 39
36 - public function convertFormSettings($formSettingsV1) {
40 + public function convertFormSettings($formSettingsV1)
41 + {
37 42 $formSettingsV2 = $formSettingsV1;
38 43 if (isset($formSettingsV1->confirmation->type->successMsg)) {
39 44 $formSettingsV2->confirmation->type->successMsg = MigrationHelper::convertSuccessMessage($formSettingsV1->confirmation->type->successMsg);
45 + }
46 + if (!empty($formSettingsV1->confirmation->type->webHooks)) {
47 + $formSettingsV2->integrations = MigrationHelper::convertWebHooksToIntegrations($formSettingsV1);
40 48 }
41 49 return $formSettingsV2;
42 50 }
43 51 }