update_with( $niche_json_data ); } public static function is_current_niche() { return brandy_is_current_niche( static::NICHE_ID ); } public function after_import_header() { if ( isset( static::REPLACED_HEADERS['main'] ) ) { $builder_settings = brandy_get_header_settings(); $main_template_id = static::REPLACED_HEADERS['main']; foreach ( $builder_settings['templates'] as $template ) { if ( $main_template_id === $template['id'] ) { $builder_settings['current_template_id'] = $main_template_id; } } set_theme_mod( 'header_settings', $builder_settings ); } if ( isset( static::REPLACED_HEADERS['checkout'] ) ) { HeaderTemplateMetaService::assign_meta_value( brandy_get_checkout_page_id(), static::REPLACED_HEADERS['checkout'] ); } } public function after_import_footer() { if ( isset( static::REPLACED_FOOTERS['main'] ) ) { $builder_settings = brandy_get_footer_settings(); $main_template_id = static::REPLACED_FOOTERS['main']; foreach ( $builder_settings['templates'] as $template ) { if ( $main_template_id === $template['id'] ) { $builder_settings['current_template_id'] = $main_template_id; } } set_theme_mod( 'footer_settings', $builder_settings ); } if ( isset( static::REPLACED_FOOTERS['checkout'] ) ) { FooterTemplateMetaService::assign_meta_value( brandy_get_checkout_page_id(), static::REPLACED_FOOTERS['checkout'] ); } } }