Automattic\WooCommerce\Blocks

AssetsController::skip_boost_minification_for_cart_checkout()publicWC 1.0

Skip Jetpack Boost minification on older versions of Jetpack Boost where it causes issues.

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

Хуков нет.

Возвращает

Разное.

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

$AssetsController = new AssetsController();
$AssetsController->skip_boost_minification_for_cart_checkout( $do_concat, $handle );
$do_concat(разное) (обязательный)
Whether to concatenate the script or not.
$handle(разное) (обязательный)
The script handle.

Код AssetsController::skip_boost_minification_for_cart_checkout() WC 9.3.3

public function skip_boost_minification_for_cart_checkout( $do_concat, $handle ) {
	$boost_is_outdated = defined( 'JETPACK_BOOST_VERSION' ) && version_compare( JETPACK_BOOST_VERSION, '3.4.2', '<' );
	$scripts_to_ignore = [
		'wc-cart-checkout-vendors',
		'wc-cart-checkout-base',
	];

	return $boost_is_outdated && in_array( $handle, $scripts_to_ignore, true ) ? false : $do_concat;
}