| @@ -1,6 +1,8 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | +use LearnPress\Databases\DataBase; | |
| 4 | + | |
| 3 | 5 | /** |
| 4 | 6 | * Class LP_Updater |
| 5 | 7 | * |
| 6 | 8 | * Update helper class providing update functions |
| @@ -34,11 +36,12 @@ | ||
| 34 | 36 | /** |
| 35 | 37 | * Check LP Database need upgrade. |
| 36 | 38 | * |
| 37 | 39 | * @return bool|int |
| 38 | - * @author tungnx | |
| 40 | + * @throws Exception | |
| 39 | 41 | * @version 1.0.1 |
| 40 | 42 | * @since 4.0.0 |
| 43 | + * @author tungnx | |
| 41 | 44 | */ |
| 42 | 45 | public function check_lp_db_need_upgrade() { |
| 43 | 46 | if ( ! current_user_can( 'administrator' ) ) { |
| 44 | 47 | return false; |
| @@ -61,9 +64,9 @@ | ||
| 61 | 64 | /** |
| 62 | 65 | * For case not have key "learnpress_db_version" on DB, still have columns of learnpress. |
| 63 | 66 | * After a long time, need remove fix fast |
| 64 | 67 | */ |
| 65 | - $lp_db = LP_Database::getInstance(); | |
| 68 | + $lp_db = DataBase::getInstance(); | |
| 66 | 69 | $check_tb_lp_order_items_exists = $lp_db->check_table_exists( $lp_db->tb_lp_order_items ); |
| 67 | 70 | $check_tb_lp_user_item_results_exists = $lp_db->check_table_exists( $lp_db->tb_lp_user_item_results ); |
| 68 | 71 | $check_col_item_id_on_lp_order_items = $lp_db->check_col_table( $lp_db->tb_lp_order_items, 'item_id' ); |
| 69 | 72 | |