WC_Twenty_Twenty_Three::init()public staticWC 1.0

Theme init.

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

Хуков нет.

Возвращает

null. Ничего.

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

$result = WC_Twenty_Twenty_Three::init();

Код WC_Twenty_Twenty_Three::init() WC 7.1.0

public static function init() {

	// This theme doesn't have a traditional sidebar.
	remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10 );

	// Enqueue theme compatibility styles.
	add_filter( 'woocommerce_enqueue_styles', array( __CLASS__, 'enqueue_styles' ) );

	// Wrap checkout form elements for styling.
	add_action( 'woocommerce_checkout_before_order_review_heading', array( __CLASS__, 'before_order_review' ) );
	add_action( 'woocommerce_checkout_after_order_review', array( __CLASS__, 'after_order_review' ) );

	// Register theme features.
	add_theme_support( 'wc-product-gallery-zoom' );
	add_theme_support( 'wc-product-gallery-lightbox' );
	add_theme_support( 'wc-product-gallery-slider' );
	add_theme_support(
		'woocommerce',
		array(
			'thumbnail_image_width' => 450,
			'single_image_width'    => 600,
		)
	);

}