Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
fix migration (#10205)
Browse files Browse the repository at this point in the history
  • Loading branch information
gigitux authored and opr committed Jul 17, 2023
1 parent 1c2e9ae commit a06c4ef
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/Domain/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,10 @@ protected function init() {
$this->register_dependencies();
$this->register_payment_methods();

if ( is_admin() ) {
if ( $this->package->get_version() !== $this->package->get_version_stored_on_db() ) {
$this->migration->run_migrations();
$this->package->set_version_stored_on_db();
}
// This is just a temporary solution to make sure the migrations are run. We have to refactor this. More details: https://github.com/woocommerce/woocommerce-blocks/issues/10196.
if ( $this->package->get_version() !== $this->package->get_version_stored_on_db() ) {
$this->migration->run_migrations();
$this->package->set_version_stored_on_db();
}

add_action(
Expand Down

0 comments on commit a06c4ef

Please sign in to comment.