register_sections(); add_action( 'brandy_print_global_css', array( $this, 'print_global_css' ) ); add_filter( 'brandy_extra_localize', array( $this, 'add_localize_data' ) ); add_filter( 'brandy_customizer_extra_panels', array( $this, 'register_extra_panels' ) ); } private function register_sections() { StoreNoticesSection::get_instance(); ProductCatalogSection::get_instance(); Checkout::get_instance(); SaleBadgeSection::get_instance(); } public function register_extra_panels( $panels ) { $panels[] = array( 'id' => self::PANEL_ID, 'title' => __( 'WooCommerce', 'brandy' ), ); return $panels; } public function remove_default_woocommerce_customizer( $wp_customize ) { $wp_customize->remove_panel( 'woocommerce' ); } /** * Returns module configurations * Because this is the main loader, so return panel configurations * * @override */ public static function get_configurations() { $configurations = array( array( 'configuration_type' => 'panel', 'id' => self::PANEL_ID, 'title' => __( 'WooCommerce', 'brandy' ), 'description' => '', 'priority' => 10, 'type' => 'brandy_panel', ), ); return $configurations; } public static function print_global_css() { if ( ! function_exists( 'is_wc_installed' ) || ! is_wc_installed() ) { return; } ?> apply_filters( 'brandy_wc_sections', array() ), 'default_settings' => apply_filters( 'brandy_wc_default_settings', array() ), ); return $data; } }