'section', 'id' => self::SECTION_ID, 'title' => __( 'Product Catalog', 'brandy' ), 'panel' => WooCommercePanel::PANEL_ID, 'type' => 'brandy-section', 'description_hidden' => true, ); $configurations[] = array( 'configuration_type' => 'control', 'id' => self::SECTION_ID, 'label' => __( 'Product Catalog', 'brandy' ), 'section' => self::SECTION_ID, 'type' => 'brandy_settings', 'input_attrs' => array( 'value' => '', 'style' => 'display:none;', ), 'partial' => false, 'default' => ProductCatalogService::get_default_settings(), 'transport' => 'postMessage', ); return $configurations; } public static function print_dynamic_css() { $thumbnail_size = ProductCatalogService::get_product_thumb_size(); $css = ''; $variables = array(); if ( 'size_1' === $thumbnail_size ) { $variables[] = '--order-item-thumb-width:72px'; $variables[] = '--order-item-thumb-height:100px'; $variables[] = '--product-thumb-aspect-ratio: 3/4;'; } if ( 'size_2' === $thumbnail_size ) { $variables[] = '--order-item-thumb-width:63px'; $variables[] = '--order-item-thumb-height:63px'; $variables[] = '--product-thumb-aspect-ratio: 1/1;'; } $css .= ':root{' . implode( ';', $variables ) . '}'; echo wp_kses_post( $css ); } }