Mark AS migration pending when updating WC to ensure migration happens.
Ideally https://github.com/woocommerce/action-scheduler/pull/470 should take care of this issue, but since we have AS 3.x in the wild without fix in the PR, this change is also necessary.
This commit is contained in:
parent
fa1f18e7c1
commit
90ab985cfb
|
@ -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',
|
||||
),
|
||||
);
|
||||
|
||||
|
|
|
@ -2091,6 +2091,13 @@ 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() {
|
||||
\ActionScheduler_DataController::mark_migration_incomplete();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update DB version.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue