PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.18
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.18
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | classes/models/FrmMigrate.php +1 -69 6.25.1 → 6.18 View file →
@@ -41,9 +41,8 @@
41 41 $old_db_version = get_option( 'frm_db_version' );
42 42
43 43 $this->create_tables();
44 44 $this->migrate_data( $old_db_version );
45 - $this->check_that_tables_exist();
46 45
47 46 // SAVE DB VERSION.
48 47 update_option( 'frm_db_version', FrmAppHelper::plugin_version() . '-' . FrmAppHelper::$db_version );
49 48
@@ -52,10 +51,8 @@
52 51
53 52 if ( false === get_option( 'frm_first_activation' ) ) {
54 53 update_option( 'frm_first_activation', time(), false );
55 54 }
56 -
57 - $this->update_settings_for_new_install();
58 55 }
59 56 }//end if
60 57
61 58 do_action( 'frm_after_install' );
@@ -70,55 +67,8 @@
70 67 $frm_style->update( 'default' );
71 68 }
72 69 }
73 70
74 - /**
75 - * Updates some settings for new installs.
76 - *
77 - * @since 6.23
78 - */
79 - private function update_settings_for_new_install() {
80 - $settings = FrmAppHelper::get_settings();
81 -
82 - $settings->denylist_check = 1;
83 - $settings->installed_after_welcome_tour_update = 1;
84 - $settings->store();
85 - }
86 -
87 - /**
88 - * If we fail to create the database tables, add an inbox notice.
89 - * This informs the user that they need to correct the issue and try again.
90 - *
91 - * @since 6.19
92 - *
93 - * @return void
94 - */
95 - private function check_that_tables_exist() {
96 - // Check the DB that the table $this->forms exists.
97 - global $wpdb;
98 - $exists = $wpdb->get_results( $wpdb->prepare( 'SHOW TABLES LIKE %s', $this->forms ) );
99 -
100 - if ( $exists ) {
101 - $inbox = new FrmInbox();
102 - $inbox->dismiss( 'failed-to-create-tables' );
103 - return;
104 - }
105 -
106 - $message = array(
107 - 'key' => 'failed-to-create-tables',
108 - 'subject' => 'Something went wrong setting up the database',
109 - 'message' => 'For steps to continue, see our <a href="https://formidableforms.com/knowledgebase/install-formidable-forms/#kb-missing-database-tables">documentation</a>. If you need assistance, we recommend that you reach out to your hosting provider. Then <a href="' . esc_url( admin_url( 'admin.php?page=formidable&frm_add_tables=1' ) ) . '">click here</a> to try again.',
110 - 'cta' => '<a href="https://formidableforms.com/knowledgebase/install-formidable-forms/#kb-missing-database-tables">Learn More</a>',
111 - 'type' => 'error',
112 - );
113 -
114 - $inbox = new FrmInbox();
115 - $inbox->add_message( $message );
116 - }
117 -
118 - /**
119 - * @return string
120 - */
121 71 public function collation() {
122 72 global $wpdb;
123 73 if ( ! $wpdb->has_cap( 'collation' ) ) {
124 74 return '';
@@ -325,9 +275,9 @@
325 275 // bail if we don't know the previous version
326 276 return;
327 277 }
328 278
329 - $migrations = array( 16, 11, 16, 17, 23, 25, 86, 90, 97, 98, 101, 104 );
279 + $migrations = array( 16, 11, 16, 17, 23, 25, 86, 90, 97, 98, 101 );
330 280 foreach ( $migrations as $migration ) {
331 281 if ( FrmAppHelper::$db_version >= $migration && $old_db_version < $migration ) {
332 282 $function_name = 'migrate_to_' . $migration;
333 283 $this->$function_name();
@@ -393,26 +343,8 @@
393 343
394 344 do_action( 'frm_after_uninstall' );
395 345
396 346 return true;
397 - }
398 -
399 - /**
400 - * In older versions of Lite, it's possible we've saved the wrong location ID.
401 - * So force it to get valid values again.
402 - *
403 - * @since 6.25
404 - *
405 - * @return void
406 - */
407 - private function migrate_to_104() {
408 - if ( FrmSquareLiteConnectHelper::get_merchant_id( 'test' ) ) {
409 - FrmSquareLiteConnectHelper::get_location_id( true, 'test' );
410 - }
411 -
412 - if ( FrmSquareLiteConnectHelper::get_merchant_id( 'live' ) ) {
413 - FrmSquareLiteConnectHelper::get_location_id( true, 'live' );
414 - }
415 347 }
416 348
417 349 /**
418 350 * Disables summary email for multisite (not the main site) if recipient setting isn't changed.