Automattic\WooCommerce\Blocks\Domain
Bootstrap::add_build_notice()
Add a notice stating that the build has not been done yet.
Method of the class: Bootstrap{}
No Hooks.
Return
null
. Nothing (null).
Usage
// protected - for code of main (parent) or child class $result = $this->add_build_notice();
Bootstrap::add_build_notice() Bootstrap::add build notice code WC 9.7.1
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>'; } ); }