Skip to content

Commit

Permalink
Check if alter table issue has been solved by trying failed alter tab…
Browse files Browse the repository at this point in the history
…le query
  • Loading branch information
randhirexpresstech committed May 16, 2024
1 parent 0dfc667 commit e538f97
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions mlw_quizmaster2.php
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,28 @@ private function add_hooks() {
add_action( 'admin_init', array( $this, 'qsm_overide_old_setting_options' ) );
add_action( 'admin_notices', array( $this, 'qsm_admin_notices' ) );
add_filter( 'manage_edit-qsm_category_columns', array( $this, 'modify_qsm_category_columns' ) );
add_action( 'admin_init', array( $this, 'has_alter_table_issue_solved' ), 999 );
}

/**
* Check if alter table issue has been solved by trying failed alter table query
*
* @since 9.0.2
*
* @return void
*/
public function has_alter_table_issue_solved() {
// Get failed alter table query list.
$failed_queries = $this->get_failed_alter_table_queries();
if ( ! empty( $failed_queries ) ) {
foreach ( $failed_queries as $failed_query ) {
$failed_query = $this->wpdb_alter_table_query( $failed_query );
// exit loop if query failed to execute
if ( false === $failed_query ) {
break;
}
}
}
}

/**
Expand Down

0 comments on commit e538f97

Please sign in to comment.