summaryrefslogtreecommitdiff
path: root/inc/builder/type/header/woo-cart
diff options
context:
space:
mode:
authorZach van Rijn <me@zv.io>2021-07-21 14:54:07 -0500
committerZach van Rijn <me@zv.io>2021-07-21 14:54:07 -0500
commit9d4123cee1867ee7199b06bdc92d40611f547ecc (patch)
tree6d864e2725242863afed1f8ba12d9c7a9bc63a69 /inc/builder/type/header/woo-cart
downloadblog-ng-9d4123cee1867ee7199b06bdc92d40611f547ecc.tar.gz
blog-ng-9d4123cee1867ee7199b06bdc92d40611f547ecc.tar.bz2
blog-ng-9d4123cee1867ee7199b06bdc92d40611f547ecc.tar.xz
blog-ng-9d4123cee1867ee7199b06bdc92d40611f547ecc.zip
Initial unmodified import from Astra (Version: 3.6.5) @ /wp-content/themes/astra/.
Diffstat (limited to 'inc/builder/type/header/woo-cart')
-rw-r--r--inc/builder/type/header/woo-cart/assets/js/minified/customizer-preview.min.js1
-rw-r--r--inc/builder/type/header/woo-cart/assets/js/unminified/customizer-preview.js220
-rw-r--r--inc/builder/type/header/woo-cart/class-astra-header-woo-cart-component.php49
-rw-r--r--inc/builder/type/header/woo-cart/class-astra-header-woo-cart-loader.php53
-rw-r--r--inc/builder/type/header/woo-cart/dynamic-css/dynamic.css.php432
5 files changed, 755 insertions, 0 deletions
diff --git a/inc/builder/type/header/woo-cart/assets/js/minified/customizer-preview.min.js b/inc/builder/type/header/woo-cart/assets/js/minified/customizer-preview.min.js
new file mode 100644
index 0000000..323ce91
--- /dev/null
+++ b/inc/builder/type/header/woo-cart/assets/js/minified/customizer-preview.min.js
@@ -0,0 +1 @@
+!function(r){var t=".ast-site-header-cart",a=".astra-cart-drawer.woocommerce-active";astra_css("astra-settings[header-woo-cart-icon-color]","color",t+" .ast-cart-menu-wrap .count, "+t+" .ast-cart-menu-wrap .count:after,"+t+" .ast-woo-header-cart-info-wrap,"+t+" .ast-site-header-cart .ast-addon-cart-wrap"),astra_css("astra-settings[header-woo-cart-icon-color]","border-color",t+" .ast-cart-menu-wrap .count, "+t+" .ast-cart-menu-wrap .count:after"),astra_css("astra-settings[header-woo-cart-icon-color]","border-color",".ast-menu-cart-fill .ast-cart-menu-wrap .count, .ast-menu-cart-fill .ast-cart-menu-wrap"),astra_color_responsive_css("woo-cart-colors","astra-settings[header-woo-cart-text-color]","color",".astra-cart-drawer-title, .ast-site-header-cart-data span, .ast-site-header-cart-data strong, .ast-site-header-cart-data .woocommerce-mini-cart__empty-message, .ast-site-header-cart-data .total .woocommerce-Price-amount, .ast-site-header-cart-data .total .woocommerce-Price-amount .woocommerce-Price-currencySymbol, .ast-header-woo-cart .ast-site-header-cart .ast-site-header-cart-data .widget_shopping_cart .mini_cart_item a.remove,"+a+" .widget_shopping_cart_content span, "+a+" .widget_shopping_cart_content strong,"+a+" .woocommerce-mini-cart__empty-message, .astra-cart-drawer .woocommerce-mini-cart *, "+a+" .astra-cart-drawer-title"),astra_color_responsive_css("woo-cart-border-color","astra-settings[header-woo-cart-text-color]","border-color",".ast-site-header-cart .ast-site-header-cart-data .widget_shopping_cart .mini_cart_item a.remove, "+a+" .widget_shopping_cart .mini_cart_item a.remove"),astra_color_responsive_css("woo-cart-colors","astra-settings[header-woo-cart-link-color]","color",t+" .ast-site-header-cart-data .widget_shopping_cart_content a:not(.button),"+a+" .widget_shopping_cart_content a:not(.button)"),astra_color_responsive_css("woo-cart-colors","astra-settings[header-woo-cart-background-color]","background-color","#ast-site-header-cart .widget_shopping_cart, .ast-site-header-cart .ast-site-header-cart-data .widget_shopping_cart .mini_cart_item a.remove:hover, .ast-site-header-cart .ast-site-header-cart-data .widget_shopping_cart .mini_cart_item:hover > a.remove,"+a+","+a+" .widget_shopping_cart .mini_cart_item a.remove:hover,"+a+" .widget_shopping_cart .mini_cart_item:hover > a.remove, #astra-mobile-cart-drawer"+a),astra_color_responsive_css("woo-cart-border-color","astra-settings[header-woo-cart-background-color]","border-color","#ast-site-header-cart .widget_shopping_cart,"+a+" .widget_shopping_cart"),astra_color_responsive_css("woo-cart-border-bottom-color","astra-settings[header-woo-cart-background-color]","border-bottom-color","#ast-site-header-cart:hover .widget_shopping_cart:before, #ast-site-header-cart:hover .widget_shopping_cart:after, .open-preview-woocommerce-cart #ast-site-header-cart .widget_shopping_cart:before, #astra-mobile-cart-drawer:hover .widget_shopping_cart:before, #astra-mobile-cart-drawer:hover .widget_shopping_cart:after, #astra-mobile-cart-drawer .widget_shopping_cart:before"),astra_color_responsive_css("woo-cart-colors","astra-settings[header-woo-cart-separator-color]","border-top-color","#ast-site-header-cart .widget_shopping_cart .woocommerce-mini-cart__total, #astra-mobile-cart-drawer .widget_shopping_cart .woocommerce-mini-cart__total, .astra-cart-drawer .astra-cart-drawer-header"),astra_color_responsive_css("woo-cart-border-bottom-colors","astra-settings[header-woo-cart-separator-color]","border-bottom-color","#ast-site-header-cart .widget_shopping_cart .woocommerce-mini-cart__total, #astra-mobile-cart-drawer .widget_shopping_cart .woocommerce-mini-cart__total, .astra-cart-drawer .astra-cart-drawer-header, #ast-site-header-cart .widget_shopping_cart .mini_cart_item, #astra-mobile-cart-drawer .widget_shopping_cart .mini_cart_item"),astra_color_responsive_css("woo-cart-colors","astra-settings[header-woo-cart-link-hover-color]","color",".ast-site-header-cart .ast-site-header-cart-data .widget_shopping_cart_content a:not(.button):hover, .ast-site-header-cart .ast-site-header-cart-data .widget_shopping_cart .mini_cart_item a.remove:hover, .ast-site-header-cart .ast-site-header-cart-data .widget_shopping_cart .mini_cart_item:hover > a.remove,"+a+" .widget_shopping_cart_content a:not(.button):hover,"+a+" .widget_shopping_cart .mini_cart_item a.remove:hover,"+a+" .widget_shopping_cart .mini_cart_item:hover > a.remove"),astra_color_responsive_css("woo-cart-border-colors","astra-settings[header-woo-cart-link-hover-color]","border-color",t+" .ast-site-header-cart-data .widget_shopping_cart .mini_cart_item a.remove:hover,"+t+" .ast-site-header-cart-data .widget_shopping_cart .mini_cart_item:hover > a.remove,"+a+" .widget_shopping_cart .mini_cart_item a.remove:hover,"+a+" .widget_shopping_cart .mini_cart_item:hover > a.remove"),astra_color_responsive_css("woo-cart-colors","astra-settings[header-woo-cart-btn-text-color]","color",t+" .ast-site-header-cart-data .widget_shopping_cart_content a.button.wc-forward:not(.checkout),"+a+" .widget_shopping_cart_content a.button.wc-forward:not(.checkout)"),astra_color_responsive_css("woo-cart-colors","astra-settings[header-woo-cart-btn-background-color]","background-color",t+" .ast-site-header-cart-data .widget_shopping_cart_content a.button.wc-forward:not(.checkout),"+a+" .widget_shopping_cart_content a.button.wc-forward:not(.checkout)"),astra_color_responsive_css("woo-cart-colors","astra-settings[header-woo-cart-btn-text-hover-color]","color",t+" .ast-site-header-cart-data .widget_shopping_cart_content a.button.wc-forward:not(.checkout):hover,"+a+" .widget_shopping_cart_content a.button.wc-forward:not(.checkout):hover"),astra_color_responsive_css("woo-cart-colors","astra-settings[header-woo-cart-btn-bg-hover-color]","background-color",t+" .ast-site-header-cart-data .widget_shopping_cart_content a.button.wc-forward:not(.checkout):hover,"+a+" .widget_shopping_cart_content a.button.wc-forward:not(.checkout):hover"),astra_color_responsive_css("woo-cart-colors","astra-settings[header-woo-checkout-btn-text-color]","color",t+" .ast-site-header-cart-data .widget_shopping_cart_content a.button.checkout.wc-forward,"+a+" .widget_shopping_cart_content a.button.checkout.wc-forward"),astra_color_responsive_css("woo-cart-colors","astra-settings[header-woo-checkout-btn-background-color]","border-color",t+" .ast-site-header-cart-data .widget_shopping_cart_content a.button.checkout.wc-forward,"+a+" .widget_shopping_cart_content a.button.checkout.wc-forward"),astra_color_responsive_css("woo-cart-background-color","astra-settings[header-woo-checkout-btn-background-color]","background-color",t+" .ast-site-header-cart-data .widget_shopping_cart_content a.button.checkout.wc-forward,"+a+" .widget_shopping_cart_content a.button.checkout.wc-forward"),astra_color_responsive_css("woo-cart-background-color","astra-settings[header-woo-checkout-btn-text-hover-color]","color",t+" .ast-site-header-cart-data .widget_shopping_cart_content a.button.checkout.wc-forward:hover,"+a+" .widget_shopping_cart_content a.button.checkout.wc-forward:hover"),astra_color_responsive_css("woo-cart-background-color","astra-settings[header-woo-checkout-btn-bg-hover-color]","background-color",t+" .ast-site-header-cart-data .widget_shopping_cart_content a.button.checkout.wc-forward:hover,"+a+" .widget_shopping_cart_content a.button.checkout.wc-forward:hover"),wp.customize("astra-settings[woo-header-cart-icon-style]",function(t){t.bind(function(t){var a=r(document).find(".ast-site-header-cart");a.removeClass("ast-menu-cart-fill ast-menu-cart-outline ast-menu-cart-none"),a.addClass("ast-menu-cart-"+t);astra_add_dynamic_css("woo-header-cart-icon-style",".ast-site-header-cart a, .ast-site-header-cart a *{ transition: all 0s; } "),wp.customize.preview.send("refresh")})}),wp.customize("astra-settings[header-woo-cart-icon-color]",function(t){t.bind(function(t){astra_add_dynamic_css("header-woo-cart-icon-color",".ast-menu-cart-fill .ast-cart-menu-wrap .count, .ast-menu-cart-fill .ast-cart-menu-wrap { background-color: "+t+"; } "),wp.customize.preview.send("refresh")})}),wp.customize("astra-settings[woo-header-cart-icon-radius]",function(t){t.bind(function(t){astra_add_dynamic_css("woo-header-cart-icon-radius",".ast-site-header-cart.ast-menu-cart-outline .ast-cart-menu-wrap, .ast-site-header-cart.ast-menu-cart-fill .ast-cart-menu-wrap, .ast-site-header-cart.ast-menu-cart-outline .ast-cart-menu-wrap .count, .ast-site-header-cart.ast-menu-cart-fill .ast-cart-menu-wrap .count, .ast-site-header-cart.ast-menu-cart-outline .ast-addon-cart-wrap, .ast-site-header-cart.ast-menu-cart-fill .ast-addon-cart-wrap { border-radius: "+t+"px; } ")})}),wp.customize("astra-settings[transparent-header-woo-cart-icon-color]",function(t){t.bind(function(t){wp.customize.preview.send("refresh")})}),astra_builder_visibility_css("section-header-woo-cart",".ast-header-woo-cart")}(jQuery); \ No newline at end of file
diff --git a/inc/builder/type/header/woo-cart/assets/js/unminified/customizer-preview.js b/inc/builder/type/header/woo-cart/assets/js/unminified/customizer-preview.js
new file mode 100644
index 0000000..0e4f415
--- /dev/null
+++ b/inc/builder/type/header/woo-cart/assets/js/unminified/customizer-preview.js
@@ -0,0 +1,220 @@
+/**
+ * This file adds some LIVE to the Customizer live preview. To leverage
+ * this, set your custom settings to 'postMessage' and then add your handling
+ * here. Your javascript should grab settings from customizer controls, and
+ * then make any necessary changes to the page using jQuery.
+ *
+ * @package Astra
+ * @since x.x.x
+ */
+
+( function( $ ) {
+
+ var selector = '.ast-site-header-cart';
+ var responsive_selector = '.astra-cart-drawer.woocommerce-active';
+
+ // Icon Color.
+ astra_css(
+ 'astra-settings[header-woo-cart-icon-color]',
+ 'color',
+ selector + ' .ast-cart-menu-wrap .count, ' + selector + ' .ast-cart-menu-wrap .count:after,' + selector + ' .ast-woo-header-cart-info-wrap,' + selector + ' .ast-site-header-cart .ast-addon-cart-wrap'
+ );
+
+ // Icon Color.
+ astra_css(
+ 'astra-settings[header-woo-cart-icon-color]',
+ 'border-color',
+ selector + ' .ast-cart-menu-wrap .count, ' + selector + ' .ast-cart-menu-wrap .count:after'
+ );
+
+ // Icon BG Color.
+ astra_css(
+ 'astra-settings[header-woo-cart-icon-color]',
+ 'border-color',
+ '.ast-menu-cart-fill .ast-cart-menu-wrap .count, .ast-menu-cart-fill .ast-cart-menu-wrap'
+ );
+
+ // WooCommerce Cart Colors.
+
+ astra_color_responsive_css(
+ 'woo-cart-colors',
+ 'astra-settings[header-woo-cart-text-color]',
+ 'color',
+ '.astra-cart-drawer-title, .ast-site-header-cart-data span, .ast-site-header-cart-data strong, .ast-site-header-cart-data .woocommerce-mini-cart__empty-message, .ast-site-header-cart-data .total .woocommerce-Price-amount, .ast-site-header-cart-data .total .woocommerce-Price-amount .woocommerce-Price-currencySymbol, .ast-header-woo-cart .ast-site-header-cart .ast-site-header-cart-data .widget_shopping_cart .mini_cart_item a.remove,' + responsive_selector + ' .widget_shopping_cart_content span, '+ responsive_selector + ' .widget_shopping_cart_content strong,'+ responsive_selector + ' .woocommerce-mini-cart__empty-message, .astra-cart-drawer .woocommerce-mini-cart *, ' + responsive_selector + ' .astra-cart-drawer-title'
+ );
+
+ astra_color_responsive_css(
+ 'woo-cart-border-color',
+ 'astra-settings[header-woo-cart-text-color]',
+ 'border-color',
+ '.ast-site-header-cart .ast-site-header-cart-data .widget_shopping_cart .mini_cart_item a.remove, '+ responsive_selector + ' .widget_shopping_cart .mini_cart_item a.remove'
+ );
+
+ astra_color_responsive_css(
+ 'woo-cart-colors',
+ 'astra-settings[header-woo-cart-link-color]',
+ 'color',
+ selector + ' .ast-site-header-cart-data .widget_shopping_cart_content a:not(.button),' + responsive_selector + ' .widget_shopping_cart_content a:not(.button)'
+ );
+
+ astra_color_responsive_css(
+ 'woo-cart-colors',
+ 'astra-settings[header-woo-cart-background-color]',
+ 'background-color',
+ '#ast-site-header-cart .widget_shopping_cart, .ast-site-header-cart .ast-site-header-cart-data .widget_shopping_cart .mini_cart_item a.remove:hover, .ast-site-header-cart .ast-site-header-cart-data .widget_shopping_cart .mini_cart_item:hover > a.remove,' + responsive_selector + ','+ responsive_selector + ' .widget_shopping_cart .mini_cart_item a.remove:hover,'+ responsive_selector + ' .widget_shopping_cart .mini_cart_item:hover > a.remove, #astra-mobile-cart-drawer' + responsive_selector
+ );
+
+ astra_color_responsive_css(
+ 'woo-cart-border-color',
+ 'astra-settings[header-woo-cart-background-color]',
+ 'border-color',
+ '#ast-site-header-cart .widget_shopping_cart,' + responsive_selector + ' .widget_shopping_cart'
+ );
+
+ astra_color_responsive_css(
+ 'woo-cart-border-bottom-color',
+ 'astra-settings[header-woo-cart-background-color]',
+ 'border-bottom-color',
+ '#ast-site-header-cart:hover .widget_shopping_cart:before, #ast-site-header-cart:hover .widget_shopping_cart:after, .open-preview-woocommerce-cart #ast-site-header-cart .widget_shopping_cart:before, #astra-mobile-cart-drawer:hover .widget_shopping_cart:before, #astra-mobile-cart-drawer:hover .widget_shopping_cart:after, #astra-mobile-cart-drawer .widget_shopping_cart:before'
+ );
+
+ astra_color_responsive_css(
+ 'woo-cart-colors',
+ 'astra-settings[header-woo-cart-separator-color]',
+ 'border-top-color',
+ '#ast-site-header-cart .widget_shopping_cart .woocommerce-mini-cart__total, #astra-mobile-cart-drawer .widget_shopping_cart .woocommerce-mini-cart__total, .astra-cart-drawer .astra-cart-drawer-header'
+ );
+
+ astra_color_responsive_css(
+ 'woo-cart-border-bottom-colors',
+ 'astra-settings[header-woo-cart-separator-color]',
+ 'border-bottom-color',
+ '#ast-site-header-cart .widget_shopping_cart .woocommerce-mini-cart__total, #astra-mobile-cart-drawer .widget_shopping_cart .woocommerce-mini-cart__total, .astra-cart-drawer .astra-cart-drawer-header, #ast-site-header-cart .widget_shopping_cart .mini_cart_item, #astra-mobile-cart-drawer .widget_shopping_cart .mini_cart_item'
+ );
+
+ astra_color_responsive_css(
+ 'woo-cart-colors',
+ 'astra-settings[header-woo-cart-link-hover-color]',
+ 'color',
+ '.ast-site-header-cart .ast-site-header-cart-data .widget_shopping_cart_content a:not(.button):hover, .ast-site-header-cart .ast-site-header-cart-data .widget_shopping_cart .mini_cart_item a.remove:hover, .ast-site-header-cart .ast-site-header-cart-data .widget_shopping_cart .mini_cart_item:hover > a.remove,' + responsive_selector + ' .widget_shopping_cart_content a:not(.button):hover,'+ responsive_selector +' .widget_shopping_cart .mini_cart_item a.remove:hover,'+ responsive_selector + ' .widget_shopping_cart .mini_cart_item:hover > a.remove'
+ );
+
+ astra_color_responsive_css(
+ 'woo-cart-border-colors',
+ 'astra-settings[header-woo-cart-link-hover-color]',
+ 'border-color',
+ selector + ' .ast-site-header-cart-data .widget_shopping_cart .mini_cart_item a.remove:hover,'+ selector + ' .ast-site-header-cart-data .widget_shopping_cart .mini_cart_item:hover > a.remove,' + responsive_selector + ' .widget_shopping_cart .mini_cart_item a.remove:hover,'+ responsive_selector + ' .widget_shopping_cart .mini_cart_item:hover > a.remove'
+ );
+
+ astra_color_responsive_css(
+ 'woo-cart-colors',
+ 'astra-settings[header-woo-cart-btn-text-color]',
+ 'color',
+ selector + ' .ast-site-header-cart-data .widget_shopping_cart_content a.button.wc-forward:not(.checkout),' + responsive_selector + ' .widget_shopping_cart_content a.button.wc-forward:not(.checkout)'
+ );
+
+ astra_color_responsive_css(
+ 'woo-cart-colors',
+ 'astra-settings[header-woo-cart-btn-background-color]',
+ 'background-color',
+ selector + ' .ast-site-header-cart-data .widget_shopping_cart_content a.button.wc-forward:not(.checkout),' + responsive_selector + ' .widget_shopping_cart_content a.button.wc-forward:not(.checkout)'
+ );
+
+ astra_color_responsive_css(
+ 'woo-cart-colors',
+ 'astra-settings[header-woo-cart-btn-text-hover-color]',
+ 'color',
+ selector + ' .ast-site-header-cart-data .widget_shopping_cart_content a.button.wc-forward:not(.checkout):hover,' + responsive_selector + ' .widget_shopping_cart_content a.button.wc-forward:not(.checkout):hover'
+ );
+
+ astra_color_responsive_css(
+ 'woo-cart-colors',
+ 'astra-settings[header-woo-cart-btn-bg-hover-color]',
+ 'background-color',
+ selector + ' .ast-site-header-cart-data .widget_shopping_cart_content a.button.wc-forward:not(.checkout):hover,' + responsive_selector + ' .widget_shopping_cart_content a.button.wc-forward:not(.checkout):hover'
+ );
+
+ astra_color_responsive_css(
+ 'woo-cart-colors',
+ 'astra-settings[header-woo-checkout-btn-text-color]',
+ 'color',
+ selector + ' .ast-site-header-cart-data .widget_shopping_cart_content a.button.checkout.wc-forward,' + responsive_selector + ' .widget_shopping_cart_content a.button.checkout.wc-forward'
+ );
+
+ astra_color_responsive_css(
+ 'woo-cart-colors',
+ 'astra-settings[header-woo-checkout-btn-background-color]',
+ 'border-color',
+ selector + ' .ast-site-header-cart-data .widget_shopping_cart_content a.button.checkout.wc-forward,' + responsive_selector + ' .widget_shopping_cart_content a.button.checkout.wc-forward'
+ );
+
+ astra_color_responsive_css(
+ 'woo-cart-background-color',
+ 'astra-settings[header-woo-checkout-btn-background-color]',
+ 'background-color',
+ selector + ' .ast-site-header-cart-data .widget_shopping_cart_content a.button.checkout.wc-forward,' + responsive_selector + ' .widget_shopping_cart_content a.button.checkout.wc-forward'
+ );
+
+ astra_color_responsive_css(
+ 'woo-cart-background-color',
+ 'astra-settings[header-woo-checkout-btn-text-hover-color]',
+ 'color',
+ selector + ' .ast-site-header-cart-data .widget_shopping_cart_content a.button.checkout.wc-forward:hover,' + responsive_selector + ' .widget_shopping_cart_content a.button.checkout.wc-forward:hover'
+ );
+
+ astra_color_responsive_css(
+ 'woo-cart-background-color',
+ 'astra-settings[header-woo-checkout-btn-bg-hover-color]',
+ 'background-color',
+ selector + ' .ast-site-header-cart-data .widget_shopping_cart_content a.button.checkout.wc-forward:hover,' + responsive_selector + ' .widget_shopping_cart_content a.button.checkout.wc-forward:hover'
+ );
+
+ /**
+ * Cart icon style
+ */
+ wp.customize( 'astra-settings[woo-header-cart-icon-style]', function( setting ) {
+ setting.bind( function( icon_style ) {
+
+ var buttons = $(document).find('.ast-site-header-cart');
+ buttons.removeClass('ast-menu-cart-fill ast-menu-cart-outline ast-menu-cart-none');
+ buttons.addClass( 'ast-menu-cart-' + icon_style );
+ var dynamicStyle = '.ast-site-header-cart a, .ast-site-header-cart a *{ transition: all 0s; } ';
+ astra_add_dynamic_css( 'woo-header-cart-icon-style', dynamicStyle );
+ wp.customize.preview.send( 'refresh' );
+ } );
+ } );
+
+ /**
+ * Cart icon style
+ */
+ wp.customize( 'astra-settings[header-woo-cart-icon-color]', function( setting ) {
+ setting.bind( function( color ) {
+ var dynamicStyle = '.ast-menu-cart-fill .ast-cart-menu-wrap .count, .ast-menu-cart-fill .ast-cart-menu-wrap { background-color: ' + color + '; } ';
+ astra_add_dynamic_css( 'header-woo-cart-icon-color', dynamicStyle );
+ wp.customize.preview.send( 'refresh' );
+ } );
+ } );
+
+ /**
+ * Cart Border Radius
+ */
+ wp.customize( 'astra-settings[woo-header-cart-icon-radius]', function( setting ) {
+ setting.bind( function( radius ) {
+ var dynamicStyle = '.ast-site-header-cart.ast-menu-cart-outline .ast-cart-menu-wrap, .ast-site-header-cart.ast-menu-cart-fill .ast-cart-menu-wrap, .ast-site-header-cart.ast-menu-cart-outline .ast-cart-menu-wrap .count, .ast-site-header-cart.ast-menu-cart-fill .ast-cart-menu-wrap .count, .ast-site-header-cart.ast-menu-cart-outline .ast-addon-cart-wrap, .ast-site-header-cart.ast-menu-cart-fill .ast-addon-cart-wrap { border-radius: ' + radius + 'px; } ';
+ astra_add_dynamic_css( 'woo-header-cart-icon-radius', dynamicStyle );
+ } );
+ } );
+
+ /**
+ * Transparent Header WOO-Cart color options - Customizer preview CSS.
+ */
+ wp.customize( 'astra-settings[transparent-header-woo-cart-icon-color]', function( setting ) {
+ setting.bind( function( cart_icon_color ) {
+ wp.customize.preview.send( 'refresh' );
+ });
+ });
+
+ // Advanced Visibility CSS Generation.
+ astra_builder_visibility_css( 'section-header-woo-cart', '.ast-header-woo-cart' );
+
+} )( jQuery );
diff --git a/inc/builder/type/header/woo-cart/class-astra-header-woo-cart-component.php b/inc/builder/type/header/woo-cart/class-astra-header-woo-cart-component.php
new file mode 100644
index 0000000..abc517e
--- /dev/null
+++ b/inc/builder/type/header/woo-cart/class-astra-header-woo-cart-component.php
@@ -0,0 +1,49 @@
+<?php
+/**
+ * WooCommerce Cart for Astra theme.
+ *
+ * @package astra-builder
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since 3.0.0
+ */
+
+if ( ! defined( 'ABSPATH' ) ) {
+ exit; // Exit if accessed directly.
+}
+
+define( 'ASTRA_HEADER_WOO_CART_DIR', ASTRA_THEME_DIR . 'inc/builder/type/header/woo-cart' );
+define( 'ASTRA_HEADER_WOO_CART_URI', ASTRA_THEME_URI . 'inc/builder/type/header/woo-cart' );
+
+if ( ! class_exists( 'Astra_Header_Woo_Cart_Component' ) ) {
+
+ /**
+ * Heading Initial Setup
+ *
+ * @since 3.0.0
+ */
+ class Astra_Header_Woo_Cart_Component {
+
+ /**
+ * Constructor function that initializes required actions and hooks
+ */
+ public function __construct() {
+
+ // @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound
+ require_once ASTRA_HEADER_WOO_CART_DIR . '/class-astra-header-woo-cart-loader.php';
+
+ // Include front end files.
+ if ( ! is_admin() ) {
+ require_once ASTRA_HEADER_WOO_CART_DIR . '/dynamic-css/dynamic.css.php';
+ }
+ // @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound
+ }
+ }
+
+ /**
+ * Kicking this off by creating an object.
+ */
+ new Astra_Header_Woo_Cart_Component();
+
+}
diff --git a/inc/builder/type/header/woo-cart/class-astra-header-woo-cart-loader.php b/inc/builder/type/header/woo-cart/class-astra-header-woo-cart-loader.php
new file mode 100644
index 0000000..860b9a9
--- /dev/null
+++ b/inc/builder/type/header/woo-cart/class-astra-header-woo-cart-loader.php
@@ -0,0 +1,53 @@
+<?php
+/**
+ * WooCommerce Cart Styling Loader for Astra theme.
+ *
+ * @package astra-builder
+ * @author Astra
+ * @copyright Copyright (c) 2020, Astra
+ * @link https://wpastra.com/
+ * @since 3.0.0
+ */
+
+if ( ! defined( 'ABSPATH' ) ) {
+ exit; // Exit if accessed directly.
+}
+
+/**
+ * Customizer Initialization
+ *
+ * @since 3.0.0
+ */
+class Astra_Header_Woo_Cart_Loader {
+
+ /**
+ * Constructor
+ *
+ * @since 3.0.0
+ */
+ public function __construct() {
+
+ add_action( 'customize_preview_init', array( $this, 'preview_scripts' ), 110 );
+ }
+
+ /**
+ * Customizer Preview
+ *
+ * @since 3.0.0
+ */
+ public function preview_scripts() {
+ /**
+ * Load unminified if SCRIPT_DEBUG is true.
+ */
+ /* Directory and Extension */
+ $dir_name = ( SCRIPT_DEBUG ) ? 'unminified' : 'minified';
+ $file_prefix = ( SCRIPT_DEBUG ) ? '' : '.min';
+ wp_enqueue_script( 'astra-header-builder-woo-cart-customizer-preview-js', ASTRA_HEADER_WOO_CART_URI . '/assets/js/' . $dir_name . '/customizer-preview' . $file_prefix . '.js', array( 'customize-preview', 'astra-customizer-preview-js' ), ASTRA_THEME_VERSION, true );
+ }
+
+}
+
+/**
+* Kicking this off by creating the object of the class.
+*/
+new Astra_Header_Woo_Cart_Loader();
diff --git a/inc/builder/type/header/woo-cart/dynamic-css/dynamic.css.php b/inc/builder/type/header/woo-cart/dynamic-css/dynamic.css.php
new file mode 100644
index 0000000..f9c9ec7
--- /dev/null
+++ b/inc/builder/type/header/woo-cart/dynamic-css/dynamic.css.php
@@ -0,0 +1,432 @@
+<?php
+/**
+ * WooCommerce Cart - Dynamic CSS
+ *
+ * @package Astra
+ * @since 3.0.0
+ */
+
+if ( ! defined( 'ABSPATH' ) ) {
+ exit; // Exit if accessed directly.
+}
+
+/**
+ * Search
+ */
+add_filter( 'astra_dynamic_theme_css', 'astra_hb_woo_cart_dynamic_css' );
+
+/**
+ * Dynamic CSS
+ *
+ * @param string $dynamic_css Astra Dynamic CSS.
+ * @param string $dynamic_css_filtered Astra Dynamic CSS Filters.
+ * @return String Generated dynamic CSS for Search.
+ *
+ * @since 3.0.0
+ */
+function astra_hb_woo_cart_dynamic_css( $dynamic_css, $dynamic_css_filtered = '' ) {
+
+ if ( ! Astra_Builder_Helper::is_component_loaded( 'woo-cart', 'header' ) ) {
+ return $dynamic_css;
+ }
+
+ $selector = '.ast-site-header-cart';
+ $trans_header_selector = '.ast-theme-transparent-header .ast-site-header-cart';
+ $theme_color = astra_get_option( 'theme-color' );
+ $icon_color = esc_attr( astra_get_option( 'header-woo-cart-icon-color', $theme_color ) );
+ $header_cart_icon_radius = astra_get_option( 'woo-header-cart-icon-radius' );
+ $cart_h_color = astra_get_foreground_color( $icon_color );
+ $header_cart_icon_style = astra_get_option( 'woo-header-cart-icon-style' );
+ $theme_h_color = astra_get_foreground_color( $theme_color );
+
+ $transparent_header_icon_color = esc_attr( astra_get_option( 'transparent-header-woo-cart-icon-color', $icon_color ) );
+ $transparent_header_cart_h_color = astra_get_foreground_color( $transparent_header_icon_color );
+
+ if ( 'none' === $header_cart_icon_style ) {
+ $icon_color = $theme_color;
+ $transparent_header_icon_color = $theme_color;
+ }
+
+ /**
+ * - WooCommerce cart styles.
+ */
+ $cart_text_color = astra_get_option( 'header-woo-cart-text-color' );
+ $cart_link_color = astra_get_option( 'header-woo-cart-link-color' );
+ $cart_bg_color = astra_get_option( 'header-woo-cart-background-color' );
+ $cart_separator_color = astra_get_option( 'header-woo-cart-separator-color' );
+ $cart_h_link_color = astra_get_option( 'header-woo-cart-link-hover-color' );
+
+ $cart_button_text_color = astra_get_option( 'header-woo-cart-btn-text-color' );
+ $cart_button_bg_color = astra_get_option( 'header-woo-cart-btn-background-color' );
+ $cart_button_text_h_color = astra_get_option( 'header-woo-cart-btn-text-hover-color' );
+ $cart_button_bg_h_color = astra_get_option( 'header-woo-cart-btn-bg-hover-color' );
+
+ $checkout_button_text_color = astra_get_option( 'header-woo-checkout-btn-text-color' );
+ $checkout_button_bg_color = astra_get_option( 'header-woo-checkout-btn-background-color' );
+ $checkout_button_text_h_color = astra_get_option( 'header-woo-checkout-btn-text-hover-color' );
+ $checkout_button_bg_h_color = astra_get_option( 'header-woo-checkout-btn-bg-hover-color' );
+
+ $header_cart_icon = '';
+
+ $cart_text_color_desktop = ( ! empty( $cart_text_color['desktop'] ) ) ? $cart_text_color['desktop'] : '';
+ $cart_text_color_mobile = ( ! empty( $cart_text_color['mobile'] ) ) ? $cart_text_color['mobile'] : '';
+ $cart_text_color_tablet = ( ! empty( $cart_text_color['tablet'] ) ) ? $cart_text_color['tablet'] : '';
+
+ $cart_bg_color_desktop = ( ! empty( $cart_bg_color['desktop'] ) ) ? $cart_bg_color['desktop'] : '';
+ $cart_bg_color_mobile = ( ! empty( $cart_bg_color['mobile'] ) ) ? $cart_bg_color['mobile'] : '';
+ $cart_bg_color_tablet = ( ! empty( $cart_bg_color['tablet'] ) ) ? $cart_bg_color['tablet'] : '';
+
+ $cart_link_color_desktop = ( ! empty( $cart_link_color['desktop'] ) ) ? $cart_link_color['desktop'] : '';
+ $cart_link_color_mobile = ( ! empty( $cart_link_color['mobile'] ) ) ? $cart_link_color['mobile'] : '';
+ $cart_link_color_tablet = ( ! empty( $cart_link_color['tablet'] ) ) ? $cart_link_color['tablet'] : '';
+
+ $cart_separator_color_desktop = ( ! empty( $cart_separator_color['desktop'] ) ) ? $cart_separator_color['desktop'] : '';
+ $cart_separator_color_mobile = ( ! empty( $cart_separator_color['mobile'] ) ) ? $cart_separator_color['mobile'] : '';
+ $cart_separator_color_tablet = ( ! empty( $cart_separator_color['tablet'] ) ) ? $cart_separator_color['tablet'] : '';
+
+ $cart_h_link_color_desktop = ( ! empty( $cart_h_link_color['desktop'] ) ) ? $cart_h_link_color['desktop'] : '';
+ $cart_h_link_color_mobile = ( ! empty( $cart_h_link_color['mobile'] ) ) ? $cart_h_link_color['mobile'] : '';
+ $cart_h_link_color_tablet = ( ! empty( $cart_h_link_color['tablet'] ) ) ? $cart_h_link_color['tablet'] : '';
+
+ $checkout_button_text_color_desktop = ( ! empty( $checkout_button_text_color['desktop'] ) ) ? $checkout_button_text_color['desktop'] : '';
+ $checkout_button_text_color_mobile = ( ! empty( $checkout_button_text_color['mobile'] ) ) ? $checkout_button_text_color['mobile'] : '';
+ $checkout_button_text_color_tablet = ( ! empty( $checkout_button_text_color['tablet'] ) ) ? $checkout_button_text_color['tablet'] : '';
+
+ $checkout_button_bg_color_desktop = ( ! empty( $checkout_button_bg_color['desktop'] ) ) ? $checkout_button_bg_color['desktop'] : '';
+ $checkout_button_bg_color_mobile = ( ! empty( $checkout_button_bg_color['mobile'] ) ) ? $checkout_button_bg_color['mobile'] : '';
+ $checkout_button_bg_color_tablet = ( ! empty( $checkout_button_bg_color['tablet'] ) ) ? $checkout_button_bg_color['tablet'] : '';
+
+ $checkout_button_text_h_color_desktop = ( ! empty( $checkout_button_text_h_color['desktop'] ) ) ? $checkout_button_text_h_color['desktop'] : '';
+ $checkout_button_text_h_color_mobile = ( ! empty( $checkout_button_text_h_color['mobile'] ) ) ? $checkout_button_text_h_color['mobile'] : '';
+ $checkout_button_text_h_color_tablet = ( ! empty( $checkout_button_text_h_color['tablet'] ) ) ? $checkout_button_text_h_color['tablet'] : '';
+
+ $checkout_button_bg_h_color_desktop = ( ! empty( $checkout_button_bg_h_color['desktop'] ) ) ? $checkout_button_bg_h_color['desktop'] : '';
+ $checkout_button_bg_h_color_mobile = ( ! empty( $checkout_button_bg_h_color['mobile'] ) ) ? $checkout_button_bg_h_color['mobile'] : '';
+ $checkout_button_bg_h_color_tablet = ( ! empty( $checkout_button_bg_h_color['tablet'] ) ) ? $checkout_button_bg_h_color['tablet'] : '';
+
+ $cart_button_text_color_desktop = ( ! empty( $cart_button_text_color['desktop'] ) ) ? $cart_button_text_color['desktop'] : '';
+ $cart_button_text_color_mobile = ( ! empty( $cart_button_text_color['mobile'] ) ) ? $cart_button_text_color['mobile'] : '';
+ $cart_button_text_color_tablet = ( ! empty( $cart_button_text_color['tablet'] ) ) ? $cart_button_text_color['tablet'] : '';
+
+ $cart_button_bg_color_desktop = ( ! empty( $cart_button_bg_color['desktop'] ) ) ? $cart_button_bg_color['desktop'] : '';
+ $cart_button_bg_color_mobile = ( ! empty( $cart_button_bg_color['mobile'] ) ) ? $cart_button_bg_color['mobile'] : '';
+ $cart_button_bg_color_tablet = ( ! empty( $cart_button_bg_color['tablet'] ) ) ? $cart_button_bg_color['tablet'] : '';
+
+ $cart_button_text_h_color_desktop = ( ! empty( $cart_button_text_h_color['desktop'] ) ) ? $cart_button_text_h_color['desktop'] : '';
+ $cart_button_text_h_color_mobile = ( ! empty( $cart_button_text_h_color['mobile'] ) ) ? $cart_button_text_h_color['mobile'] : '';
+ $cart_button_text_h_color_tablet = ( ! empty( $cart_button_text_h_color['tablet'] ) ) ? $cart_button_text_h_color['tablet'] : '';
+
+ $cart_button_bg_h_color_desktop = ( ! empty( $cart_button_bg_h_color['desktop'] ) ) ? $cart_button_bg_h_color['desktop'] : '';
+ $cart_button_bg_h_color_mobile = ( ! empty( $cart_button_bg_h_color['mobile'] ) ) ? $cart_button_bg_h_color['mobile'] : '';
+ $cart_button_bg_h_color_tablet = ( ! empty( $cart_button_bg_h_color['tablet'] ) ) ? $cart_button_bg_h_color['tablet'] : '';
+
+ /**
+ * Woo Cart CSS.
+ */
+ $css_output_desktop = array(
+
+ $selector . ' .ast-cart-menu-wrap, ' . $selector . ' .ast-addon-cart-wrap' => array(
+ 'color' => $icon_color,
+ ),
+ $selector . ' .ast-cart-menu-wrap .count, ' . $selector . ' .ast-cart-menu-wrap .count:after, ' . $selector . ' .ast-addon-cart-wrap .count, ' . $selector . ' .ast-addon-cart-wrap .ast-icon-shopping-cart:after' => array(
+ 'color' => $icon_color,
+ 'border-color' => $icon_color,
+ ),
+ $selector . ' .ast-addon-cart-wrap .ast-icon-shopping-cart:after' => array(
+ 'color' => esc_attr( $theme_h_color ),
+ 'background-color' => esc_attr( $icon_color ),
+ ),
+ $selector . ' .ast-woo-header-cart-info-wrap' => array(
+ 'color' => esc_attr( $icon_color ),
+ ),
+ $selector . ' .ast-addon-cart-wrap i.astra-icon:after' => array(
+ 'color' => esc_attr( $theme_h_color ),
+ 'background-color' => esc_attr( $icon_color ),
+ ),
+ /**
+ * Transparent Header - Woo Cart icon color.
+ */
+ $trans_header_selector . ' .ast-cart-menu-wrap, ' . $trans_header_selector . ' .ast-addon-cart-wrap' => array(
+ 'color' => $transparent_header_icon_color,
+ ),
+ $trans_header_selector . ' .ast-cart-menu-wrap .count, ' . $trans_header_selector . ' .ast-cart-menu-wrap .count:after, ' . $trans_header_selector . ' .ast-addon-cart-wrap .count, ' . $trans_header_selector . ' .ast-addon-cart-wrap .ast-icon-shopping-cart:after' => array(
+ 'color' => $transparent_header_icon_color,
+ 'border-color' => $transparent_header_icon_color,
+ ),
+ $trans_header_selector . ' .ast-addon-cart-wrap .ast-icon-shopping-cart:after' => array(
+ 'color' => esc_attr( $theme_h_color ),
+ 'background-color' => esc_attr( $transparent_header_icon_color ),
+ ),
+ $trans_header_selector . ' .ast-woo-header-cart-info-wrap' => array(
+ 'color' => esc_attr( $transparent_header_icon_color ),
+ ),
+ $trans_header_selector . ' .ast-addon-cart-wrap i.astra-icon:after' => array(
+ 'color' => esc_attr( $theme_h_color ),
+ 'background-color' => esc_attr( $transparent_header_icon_color ),
+ ),
+ /**
+ * General Woo Cart tray color for widget
+ */
+ '.ast-site-header-cart .ast-site-header-cart-data .widget_shopping_cart_content a:not(.button)' => array(
+ 'color' => esc_attr( $cart_link_color_desktop ),
+ ),
+ '.ast-site-header-cart-data span, .ast-site-header-cart-data strong, .ast-site-header-cart-data .woocommerce-mini-cart__empty-message, .ast-site-header-cart-data .total .woocommerce-Price-amount, .ast-site-header-cart-data .total .woocommerce-Price-amount .woocommerce-Price-currencySymbol, .ast-header-woo-cart .ast-site-header-cart .ast-site-header-cart-data .widget_shopping_cart .mini_cart_item a.remove' => array(
+ 'color' => esc_attr( $cart_text_color_desktop ),
+ ),
+ '.ast-site-header-cart .ast-site-header-cart-data .widget_shopping_cart_content a:not(.button):hover' => array(
+ 'color' => esc_attr( $cart_h_link_color_desktop ),
+ ),
+ '#ast-site-header-cart .widget_shopping_cart' => array(
+ 'background-color' => esc_attr( $cart_bg_color_desktop ),
+ 'border-color' => esc_attr( $cart_bg_color_desktop ),
+ ),
+ '#ast-site-header-cart .widget_shopping_cart .woocommerce-mini-cart__total, .astra-cart-drawer .astra-cart-drawer-header' => array(
+ 'border-top-color' => esc_attr( $cart_separator_color_desktop ),
+ 'border-bottom-color' => esc_attr( $cart_separator_color_desktop ),
+ ),
+ '#ast-site-header-cart .widget_shopping_cart .mini_cart_item' => array(
+ 'border-bottom-color' => astra_hex_to_rgba( $cart_separator_color_desktop ),
+ ),
+ '#ast-site-header-cart:hover .widget_shopping_cart:before, #ast-site-header-cart:hover .widget_shopping_cart:after, .open-preview-woocommerce-cart #ast-site-header-cart .widget_shopping_cart:before' => array(
+ 'border-bottom-color' => esc_attr( $cart_bg_color_desktop ),
+ ),
+ '.ast-site-header-cart .ast-site-header-cart-data .widget_shopping_cart .mini_cart_item a.remove' => array(
+ 'border-color' => esc_attr( $cart_text_color_desktop ),
+ ),
+ '.ast-site-header-cart .ast-site-header-cart-data .widget_shopping_cart .mini_cart_item a.remove:hover, .ast-site-header-cart .ast-site-header-cart-data .widget_shopping_cart .mini_cart_item:hover > a.remove' => array(
+ 'color' => esc_attr( $cart_h_link_color_desktop ),
+ 'border-color' => esc_attr( $cart_h_link_color_desktop ),
+ 'background-color' => esc_attr( $cart_bg_color_desktop ),
+ ),
+
+ /**
+ * Cart button color for widget
+ */
+ '.ast-site-header-cart .ast-site-header-cart-data .widget_shopping_cart_content a.button.wc-forward:not(.checkout)' => array(
+ 'color' => esc_attr( $cart_button_text_color_desktop ),
+ 'background-color' => esc_attr( $cart_button_bg_color_desktop ),
+ ),
+ '.ast-site-header-cart .ast-site-header-cart-data .widget_shopping_cart_content a.button.wc-forward:not(.checkout):hover' => array(
+ 'color' => esc_attr( $cart_button_text_h_color_desktop ),
+ 'background-color' => esc_attr( $cart_button_bg_h_color_desktop ),
+ ),
+
+ /**
+ * Checkout button color for widget
+ */
+ '.ast-site-header-cart .ast-site-header-cart-data .widget_shopping_cart_content a.button.checkout.wc-forward' => array(
+ 'color' => esc_attr( $checkout_button_text_color_desktop ),
+ 'border-color' => esc_attr( $checkout_button_bg_color_desktop ),
+ 'background-color' => esc_attr( $checkout_button_bg_color_desktop ),
+ ),
+ '.ast-site-header-cart .ast-site-header-cart-data .widget_shopping_cart_content a.button.checkout.wc-forward:hover' => array(
+ 'color' => esc_attr( $checkout_button_text_h_color_desktop ),
+ 'background-color' => esc_attr( $checkout_button_bg_h_color_desktop ),
+ ),
+ );
+
+ /* Parse CSS from array() */
+ $css_output = astra_parse_css( $css_output_desktop );
+ $responsive_selector = '.astra-cart-drawer.woocommerce-active';
+
+ $css_output_mobile = array(
+ $responsive_selector . ' .astra-cart-drawer-title, ' . $responsive_selector . ' .widget_shopping_cart_content span, ' . $responsive_selector . ' .widget_shopping_cart_content strong,' . $responsive_selector . ' .woocommerce-mini-cart__empty-message, .astra-cart-drawer .woocommerce-mini-cart *' => array(
+ 'color' => esc_attr( $cart_text_color_mobile ),
+ ),
+ $responsive_selector . ' .widget_shopping_cart .mini_cart_item a.remove' => array(
+ 'border-color' => esc_attr( $cart_text_color_mobile ),
+ ),
+ $responsive_selector . '#astra-mobile-cart-drawer' => array(
+ 'background-color' => esc_attr( $cart_bg_color_mobile ),
+ 'border-color' => esc_attr( $cart_bg_color_mobile ),
+ ),
+ '#astra-mobile-cart-drawer:hover .widget_shopping_cart:before, #astra-mobile-cart-drawer:hover .widget_shopping_cart:after, .open-preview-woocommerce-cart #astra-mobile-cart-drawer .widget_shopping_cart:before' => array(
+ 'border-bottom-color' => esc_attr( $cart_bg_color_mobile ),
+ ),
+ $responsive_selector . ' .widget_shopping_cart .mini_cart_item a.remove:hover,' . $responsive_selector . ' .widget_shopping_cart .mini_cart_item:hover > a.remove' => array(
+ 'color' => esc_attr( $cart_h_link_color_mobile ),
+ 'border-color' => esc_attr( $cart_h_link_color_mobile ),
+ 'background-color' => esc_attr( $cart_bg_color_mobile ),
+ ),
+ $responsive_selector . ' .widget_shopping_cart_content a:not(.button)' => array(
+ 'color' => esc_attr( $cart_link_color_mobile ),
+ ),
+ '#astra-mobile-cart-drawer .widget_shopping_cart .woocommerce-mini-cart__total, .astra-cart-drawer.woocommerce-active .astra-cart-drawer-header' => array(
+ 'border-top-color' => esc_attr( $cart_separator_color_mobile ),
+ 'border-bottom-color' => esc_attr( $cart_separator_color_mobile ),
+ ),
+ '#astra-mobile-cart-drawer .widget_shopping_cart .mini_cart_item' => array(
+ 'border-bottom-color' => astra_hex_to_rgba( $cart_separator_color_mobile ),
+ ),
+ $responsive_selector . ' .widget_shopping_cart_content a:not(.button):hover' => array(
+ 'color' => esc_attr( $cart_h_link_color_mobile ),
+ ),
+ /**
+ * Checkout button color for widget
+ */
+ $responsive_selector . ' .widget_shopping_cart_content a.button.checkout.wc-forward' => array(
+ 'color' => esc_attr( $checkout_button_text_color_mobile ),
+ 'border-color' => esc_attr( $checkout_button_bg_color_mobile ),
+ 'background-color' => esc_attr( $checkout_button_bg_color_mobile ),
+ ),
+ $responsive_selector . ' .widget_shopping_cart_content a.button.checkout.wc-forward:hover' => array(
+ 'color' => esc_attr( $checkout_button_text_h_color_mobile ),
+ 'background-color' => esc_attr( $checkout_button_bg_h_color_mobile ),
+ ),
+
+ /**
+ * Cart button color for widget
+ */
+ $responsive_selector . ' .widget_shopping_cart_content a.button.wc-forward:not(.checkout)' => array(
+ 'color' => esc_attr( $cart_button_text_color_mobile ),
+ 'background-color' => esc_attr( $cart_button_bg_color_mobile ),
+ ),
+ $responsive_selector . ' .widget_shopping_cart_content a.button.wc-forward:not(.checkout):hover' => array(
+ 'color' => esc_attr( $cart_button_text_h_color_mobile ),
+ 'background-color' => esc_attr( $cart_button_bg_h_color_mobile ),
+ ),
+
+ );
+
+ $css_output_tablet = array(
+ $responsive_selector . ' .astra-cart-drawer-title, ' . $responsive_selector . ' .widget_shopping_cart_content span, ' . $responsive_selector . ' .widget_shopping_cart_content strong,' . $responsive_selector . ' .woocommerce-mini-cart__empty-message, .astra-cart-drawer .woocommerce-mini-cart *' => array(
+ 'color' => esc_attr( $cart_text_color_tablet ),
+ ),
+ $responsive_selector . ' .widget_shopping_cart .mini_cart_item a.remove' => array(
+ 'border-color' => esc_attr( $cart_text_color_tablet ),
+ ),
+ $responsive_selector . '#astra-mobile-cart-drawer' => array(
+ 'background-color' => esc_attr( $cart_bg_color_tablet ),
+ 'border-color' => esc_attr( $cart_bg_color_tablet ),
+ ),
+ '#astra-mobile-cart-drawer:hover .widget_shopping_cart:before, #astra-mobile-cart-drawer:hover .widget_shopping_cart:after, .open-preview-woocommerce-cart #astra-mobile-cart-drawer .widget_shopping_cart:before' => array(
+ 'border-bottom-color' => esc_attr( $cart_bg_color_tablet ),
+ ),
+ $responsive_selector . ' .widget_shopping_cart .mini_cart_item a.remove:hover,' . $responsive_selector . ' .widget_shopping_cart .mini_cart_item:hover > a.remove' => array(
+ 'color' => esc_attr( $cart_h_link_color_tablet ),
+ 'border-color' => esc_attr( $cart_h_link_color_tablet ),
+ 'background-color' => esc_attr( $cart_bg_color_tablet ),
+ ),
+ $responsive_selector . ' .widget_shopping_cart_content a:not(.button)' => array(
+ 'color' => esc_attr( $cart_link_color_tablet ),
+ ),
+ '#astra-mobile-cart-drawer .widget_shopping_cart .woocommerce-mini-cart__total, .astra-cart-drawer .astra-cart-drawer-header' => array(
+ 'border-top-color' => esc_attr( $cart_separator_color_tablet ),
+ 'border-bottom-color' => esc_attr( $cart_separator_color_tablet ),
+ ),
+ '#astra-mobile-cart-drawer .widget_shopping_cart .mini_cart_item' => array(
+ 'border-bottom-color' => astra_hex_to_rgba( $cart_separator_color_tablet ),
+ ),
+ $responsive_selector . ' .widget_shopping_cart_content a:not(.button):hover' => array(
+ 'color' => esc_attr( $cart_h_link_color_tablet ),
+ ),
+ /**
+ * Checkout button color for widget
+ */
+ $responsive_selector . ' .widget_shopping_cart_content a.button.checkout.wc-forward' => array(
+ 'color' => esc_attr( $checkout_button_text_color_tablet ),
+ 'border-color' => esc_attr( $checkout_button_bg_color_tablet ),
+ 'background-color' => esc_attr( $checkout_button_bg_color_tablet ),
+ ),
+ $responsive_selector . ' .widget_shopping_cart_content a.button.checkout.wc-forward:hover' => array(
+ 'color' => esc_attr( $checkout_button_text_h_color_tablet ),
+ 'background-color' => esc_attr( $checkout_button_bg_h_color_tablet ),
+ ),
+
+ /**
+ * Cart button color for widget
+ */
+ $responsive_selector . ' .widget_shopping_cart_content a.button.wc-forward:not(.checkout)' => array(
+ 'color' => esc_attr( $cart_button_text_color_tablet ),
+ 'background-color' => esc_attr( $cart_button_bg_color_tablet ),
+ ),
+ $responsive_selector . ' .widget_shopping_cart_content a.button.wc-forward:not(.checkout):hover' => array(
+ 'color' => esc_attr( $cart_button_text_h_color_tablet ),
+ 'background-color' => esc_attr( $cart_button_bg_h_color_tablet ),
+ ),
+
+ );
+
+ $css_output .= astra_parse_css( $css_output_tablet, '', astra_get_tablet_breakpoint() );
+ $css_output .= astra_parse_css( $css_output_mobile, '', astra_get_mobile_breakpoint() );
+
+ if ( 'none' !== $header_cart_icon_style ) {
+
+ $header_cart_icon = array(
+
+ $selector . ' .ast-cart-menu-wrap, ' . $selector . ' .ast-addon-cart-wrap' => array(
+ 'color' => $icon_color,
+ ),
+ // Outline icon hover colors.
+ '.ast-site-header-cart .ast-cart-menu-wrap:hover .count, .ast-site-header-cart .ast-addon-cart-wrap:hover .count' => array(
+ 'color' => esc_attr( $cart_h_color ),
+ 'background-color' => esc_attr( $icon_color ),
+ ),
+ // Outline icon colors.
+ '.ast-menu-cart-outline .ast-cart-menu-wrap .count, .ast-menu-cart-outline .ast-addon-cart-wrap' => array(
+ 'color' => esc_attr( $icon_color ),
+ ),
+ // Outline Info colors.
+ $selector . ' .ast-menu-cart-outline .ast-woo-header-cart-info-wrap' => array(
+ 'color' => esc_attr( $icon_color ),
+ ),
+
+ // Fill icon Color.
+ '.ast-menu-cart-fill .ast-cart-menu-wrap .count,.ast-menu-cart-fill .ast-cart-menu-wrap, .ast-menu-cart-fill .ast-addon-cart-wrap .ast-woo-header-cart-info-wrap,.ast-menu-cart-fill .ast-addon-cart-wrap' => array(
+ 'background-color' => esc_attr( $icon_color ),
+ 'color' => esc_attr( $cart_h_color ),
+ ),
+
+ // Transparent Header - Cart Icon color.
+ $trans_header_selector . ' .ast-cart-menu-wrap, ' . $trans_header_selector . ' .ast-addon-cart-wrap' => array(
+ 'color' => $transparent_header_icon_color,
+ ),
+ // Outline icon hover colors.
+ '.ast-theme-transparent-header .ast-site-header-cart .ast-cart-menu-wrap:hover .count, .ast-theme-transparent-header .ast-site-header-cart .ast-addon-cart-wrap:hover .count' => array(
+ 'color' => esc_attr( $transparent_header_cart_h_color ),
+ 'background-color' => esc_attr( $transparent_header_icon_color ),
+ ),
+ // Outline icon colors.
+ '.ast-theme-transparent-header .ast-menu-cart-outline .ast-cart-menu-wrap .count, .ast-theme-transparent-header .ast-menu-cart-outline .ast-addon-cart-wrap' => array(
+ 'color' => esc_attr( $transparent_header_icon_color ),
+ ),
+ // Outline Info colors.
+ $trans_header_selector . ' .ast-menu-cart-outline .ast-woo-header-cart-info-wrap' => array(
+ 'color' => esc_attr( $transparent_header_icon_color ),
+ ),
+
+ // Fill icon Color.
+ '.ast-theme-transparent-header .ast-menu-cart-fill .ast-cart-menu-wrap .count, .ast-theme-transparent-header .ast-menu-cart-fill .ast-cart-menu-wrap, .ast-theme-transparent-header .ast-menu-cart-fill .ast-addon-cart-wrap .ast-woo-header-cart-info-wrap, .ast-theme-transparent-header .ast-menu-cart-fill .ast-addon-cart-wrap' => array(
+ 'background-color' => esc_attr( $transparent_header_icon_color ),
+ 'color' => esc_attr( $transparent_header_cart_h_color ),
+ ),
+
+ // Border radius.
+ '.ast-site-header-cart.ast-menu-cart-outline .ast-cart-menu-wrap, .ast-site-header-cart.ast-menu-cart-fill .ast-cart-menu-wrap, .ast-site-header-cart.ast-menu-cart-outline .ast-cart-menu-wrap .count, .ast-site-header-cart.ast-menu-cart-fill .ast-cart-menu-wrap .count, .ast-site-header-cart.ast-menu-cart-outline .ast-addon-cart-wrap, .ast-site-header-cart.ast-menu-cart-fill .ast-addon-cart-wrap, .ast-site-header-cart.ast-menu-cart-outline .ast-woo-header-cart-info-wrap, .ast-site-header-cart.ast-menu-cart-fill .ast-woo-header-cart-info-wrap' => array(
+ 'border-radius' => astra_get_css_value( $header_cart_icon_radius, 'px' ),
+ ),
+ );
+
+ // We adding this conditional CSS only to maintain backwards. Remove this condition after 2-3 updates of add-on.
+ if ( defined( 'ASTRA_EXT_VER' ) && version_compare( ASTRA_EXT_VER, '3.4.2', '<' ) ) {
+ // Outline cart style border.
+ $header_cart_icon['.ast-menu-cart-outline .ast-cart-menu-wrap .count, .ast-menu-cart-outline .ast-addon-cart-wrap'] = array(
+ 'border' => '2px solid ' . $icon_color,
+ 'color' => esc_attr( $icon_color ),
+ );
+ // Transparent Header outline cart style border.
+ $header_cart_icon['.ast-theme-transparent-header .ast-menu-cart-outline .ast-cart-menu-wrap .count, .ast-theme-transparent-header .ast-menu-cart-outline .ast-addon-cart-wrap'] = array(
+ 'border' => '2px solid ' . $transparent_header_icon_color,
+ 'color' => esc_attr( $transparent_header_icon_color ),
+ );
+ }
+
+ $css_output .= astra_parse_css( $header_cart_icon );
+ }
+
+ $css_output .= Astra_Builder_Base_Dynamic_CSS::prepare_visibility_css( 'section-header-woo-cart', '.ast-header-woo-cart' );
+
+ $dynamic_css .= $css_output;
+
+ return $dynamic_css;
+}