Automattic\WooCommerce\Blocks\Domain
Bootstrap::add_build_notice()
Add a notice stating that the build has not been done yet.
Метод класса: Bootstrap{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->add_build_notice();
Код Bootstrap::add_build_notice() Bootstrap::add build notice WC 9.8.5
protected function add_build_notice() { if ( $this->is_built() ) { return; } add_action( 'admin_notices', function () { echo '<div class="error"><p>'; printf( /* translators: %1$s is the node install command, %2$s is the install command, %3$s is the build command, %4$s is the watch command. */ esc_html__( 'WooCommerce Blocks development mode requires files to be built. From the root directory, run %1$s to ensure your node version is aligned, run %2$s to install dependencies, %3$s to build the files or %4$s to build the files and watch for changes.', 'woocommerce' ), '<code>nvm use</code>', '<code>pnpm install</code>', '<code>pnpm --filter="@woocommerce/plugin-woocommerce" build</code>', '<code>pnpm --filter="@woocommerce/plugin-woocommerce" watch:build</code>' ); echo '</p></div>'; } ); }