Merge pull request #25707 from woocommerce/fix/as-460
Mark AS migration pending when updating WC to ensure migration happens.
This commit is contained in:
commit
7fdee5b03e
|
@ -146,6 +146,7 @@ class WC_Install {
|
|||
'wc_update_product_lookup_tables',
|
||||
'wc_update_400_increase_size_of_column',
|
||||
'wc_update_400_db_version',
|
||||
'wc_reset_action_scheduler_migration_status',
|
||||
),
|
||||
);
|
||||
|
||||
|
|
|
@ -2092,6 +2092,18 @@ function wc_update_400_increase_size_of_column() {
|
|||
$wpdb->query( "ALTER TABLE {$wpdb->prefix}wc_product_meta_lookup MODIFY COLUMN `max_price` decimal(19,4) NULL default NULL" );
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset ActionScheduler migration status. Needs AS >= 3.0 shipped with WC >= 4.0.
|
||||
*/
|
||||
function wc_reset_action_scheduler_migration_status() {
|
||||
if (
|
||||
class_exists( 'ActionScheduler_DataController' ) &&
|
||||
method_exists( 'ActionScheduler_DataController', 'mark_migration_incomplete' )
|
||||
) {
|
||||
\ActionScheduler_DataController::mark_migration_incomplete();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update DB version.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue