From a06c4efbcad38080dae87a8cc0dc1e6c367f6a66 Mon Sep 17 00:00:00 2001 From: Luigi Teschio Date: Fri, 14 Jul 2023 13:16:06 +0200 Subject: [PATCH] fix migration (#10205) --- src/Domain/Bootstrap.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Domain/Bootstrap.php b/src/Domain/Bootstrap.php index f0c1bed7c00..056de6871ef 100644 --- a/src/Domain/Bootstrap.php +++ b/src/Domain/Bootstrap.php @@ -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(