diff --git a/includes/theme-support/class-wc-twenty-seventeen.php b/includes/theme-support/class-wc-twenty-seventeen.php index bd21c5e72d0..3e8cb76892b 100644 --- a/includes/theme-support/class-wc-twenty-seventeen.php +++ b/includes/theme-support/class-wc-twenty-seventeen.php @@ -14,15 +14,15 @@ if ( ! defined( 'ABSPATH' ) ) { class WC_Twenty_Seventeen { /** - * Constructor. + * Theme init. */ - public function __construct() { + public function init() { 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( $this, 'output_content_wrapper' ), 10 ); - add_action( 'woocommerce_after_main_content', array( $this, 'output_content_wrapper_end' ), 10 ); - add_filter( 'woocommerce_enqueue_styles', array( $this, 'enqueue_styles' ) ); + 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 ); + add_filter( 'woocommerce_enqueue_styles', array( __CLASS__, 'enqueue_styles' ) ); } /** @@ -31,7 +31,7 @@ class WC_Twenty_Seventeen { * @param array $styles * @return array */ - public function enqueue_styles( $styles ) { + public static function enqueue_styles( $styles ) { unset( $styles['woocommerce-general'] ); $styles['woocommerce-twenty-seventeen'] = array( @@ -47,7 +47,7 @@ class WC_Twenty_Seventeen { /** * Open the Twenty Seventeen wrapper. */ - public function output_content_wrapper() { ?> + public static function output_content_wrapper() { ?>