WC_Twenty_Nineteen::init()
Theme init.
Method of the class: WC_Twenty_Nineteen{}
No Hooks.
Return
null
. Nothing (null).
Usage
$result = WC_Twenty_Nineteen::init();
WC_Twenty_Nineteen::init() WC Twenty Nineteen::init code WC 9.3.3
public static function init() { // Change WooCommerce wrappers. remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 ); remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10 ); add_action( 'woocommerce_before_main_content', array( __CLASS__, 'output_content_wrapper' ), 10 ); add_action( 'woocommerce_after_main_content', array( __CLASS__, 'output_content_wrapper_end' ), 10 ); // 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' ) ); // 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' => 300, 'single_image_width' => 450, ) ); // Tweak Twenty Nineteen features. add_action( 'wp', array( __CLASS__, 'tweak_theme_features' ) ); // Color scheme CSS. add_filter( 'twentynineteen_custom_colors_css', array( __CLASS__, 'custom_colors_css' ), 10, 3 ); }