PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 2.15.3
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v2.15.3
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/MigrateForms.php +1 -29 2.10.22.15.3 View file →
@@ -17,39 +17,11 @@
17 17 }
18 18 self::migratePaypal();
19 19 $config = (object) [];
20 20 $config->delete_table = true;
21 - $this->duplicateV1StyleFiles();
22 21 update_option('bitform_app_config', $config);
22 + set_transient('bitforms_v1_form_contents', $newFormContents);
23 23 return $newFormContents;
24 - }
25 -
26 - public function rollbackToV1()
27 - {
28 - $this->dropTableAndRename('form', 'form_v1');
29 - $this->dropTableAndRename('workflows', 'workflows_v1');
30 - $this->dropTableAndRename('success_messages', 'success_messages_v1');
31 - $source = BITFORMS_CONTENT_DIR . DIRECTORY_SEPARATOR . 'form-styles';
32 - MigrationHelper::recursiveDeleteFiles($source);
33 - $destination = BITFORMS_CONTENT_DIR . DIRECTORY_SEPARATOR . 'form-styles-v1';
34 - MigrationHelper::recursiveCopyFiles($destination, $source);
35 - MigrationHelper::recursiveDeleteFiles($destination);
36 - if (file_exists($destination)) {
37 - rmdir($destination);
38 - }
39 - delete_option('bitforms_migrating_to_v2');
40 - delete_option('bitforms_migrated_to_v2');
41 - }
42 -
43 - private function duplicateV1StyleFiles()
44 - {
45 - $source = BITFORMS_CONTENT_DIR . DIRECTORY_SEPARATOR . 'form-styles';
46 - $destination = BITFORMS_CONTENT_DIR . DIRECTORY_SEPARATOR . 'form-styles-v1';
47 - if (!file_exists(BITFORMS_CONTENT_DIR . DIRECTORY_SEPARATOR . 'form-styles-v1')) {
48 - wp_mkdir_p(BITFORMS_CONTENT_DIR . DIRECTORY_SEPARATOR . 'form-styles-v1');
49 - }
50 - MigrationHelper::recursiveCopyFiles($source, $destination);
51 - MigrationHelper::recursiveDeleteFiles($source);
52 24 }
53 25
54 26 private static function migratePaypal()
55 27 {