WooCommerce::build_dependencies_notice()publicWC 1.0

Output a admin notice when build dependencies not met.

Метод класса: WooCommerce{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$WooCommerce = new WooCommerce();
$WooCommerce->build_dependencies_notice();

Код WooCommerce::build_dependencies_notice() WC 8.7.0

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
}