WooCommerce::build_dependencies_notice()
Output a admin notice when build dependencies not met.
Method of the class: WooCommerce{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WooCommerce = new WooCommerce(); $WooCommerce->build_dependencies_notice();
WooCommerce::build_dependencies_notice() WooCommerce::build dependencies notice code WC 9.2.3
public function build_dependencies_notice() { if ( $this->build_dependencies_satisfied() ) { return; } $message_one = __( 'You have installed a development version of WooCommerce which requires files to be built and minified. From the plugin directory, run <code>pnpm install</code> and then <code>pnpm --filter=\'@woocommerce/plugin-woocommerce\' build</code> to build and minify assets.', 'woocommerce' ); $message_two = sprintf( /* translators: 1: URL of WordPress.org Repository 2: URL of the GitHub Repository release page */ __( 'Or you can download a pre-built version of the plugin from the <a href="%1$s">WordPress.org repository</a> or by visiting <a href="%2$s">the releases page in the GitHub repository</a>.', 'woocommerce' ), 'https://wordpress.org/plugins/woocommerce/', 'https://github.com/woocommerce/woocommerce/releases' ); printf( '<div class="error"><p>%s %s</p></div>', $message_one, $message_two ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped }