WooCommerce Variation Swatches - Version 1.1.2

Version Description

  • Fix: Customizer JS Issue.
Download this release

Release Info

Developer EmranAhmed
Plugin Icon 128x128 WooCommerce Variation Swatches
Version 1.1.2
Comparing to
See all releases

Code changes from version 1.1.1 to 1.1.2

README.txt CHANGED
@@ -390,6 +390,10 @@ And your are ready to go.
390
 
391
  == Changelog ==
392
 
 
 
 
 
393
  = 1.1.1 =
394
 
395
  * Update: WooCommerce 4.7 compatibility
390
 
391
  == Changelog ==
392
 
393
+ = 1.1.2 =
394
+
395
+ * Fix: Customizer JS Issue.
396
+
397
  = 1.1.1 =
398
 
399
  * Update: WooCommerce 4.7 compatibility
assets/css/admin.css CHANGED
@@ -1,8 +1,8 @@
1
  /*!
2
- * Variation Swatches for WooCommerce v1.1.1
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
- * Date: 11/16/2020, 8:52:49 PM
6
  * Released under the GPLv3 license.
7
  */
8
  .button.button-danger {
1
  /*!
2
+ * Variation Swatches for WooCommerce v1.1.2
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
+ * Date: 11/26/2020, 7:20:28 PM
6
  * Released under the GPLv3 license.
7
  */
8
  .button.button-danger {
assets/css/admin.min.css CHANGED
@@ -1,8 +1,8 @@
1
  /*!
2
- * Variation Swatches for WooCommerce v1.1.1
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
- * Date: 11/16/2020, 8:52:54 PM
6
  * Released under the GPLv3 license.
7
  */
8
  .button.button-danger{color:#fff;background-color:#af2d2b;border-color:#a62d2b;box-shadow:0 1px 0 #a72d2b;vertical-align:top}.button.button-danger.active,.button.button-danger:active,.button.button-danger:focus,.button.button-danger:hover{color:#fff;background:#c9302c}[data-wvsdepends]{display:none}.meta-image-field-wrapper{display:table}.meta-image-field-wrapper .button{margin:5px 0;display:block}.meta-image-field-wrapper .image-preview{display:table-cell;width:60px;padding-right:10px}.meta-image-field-wrapper .button-wrapper{display:table-cell;vertical-align:top}.gwp-rate-stars{display:inline-block;color:#ffb900;position:relative;top:3px}.gwp-rate-stars svg,.gwp-rate-stars svg a{fill:#ffb900;stroke:#ffb900;cursor:pointer}.gwp-rate-stars svg:hover,.gwp-rate-stars svg a:hover{fill:#ffb900}.gwp-rate-stars svg:hover~svg,.gwp-rate-stars svg:hover~svg a,.gwp-rate-stars svg a:hover~svg,.gwp-rate-stars svg a:hover~svg a{fill:none}#wvs-meta-preview{width:30px}.wvs-preview{width:30px;height:30px;border:1px solid #000}#woo-variation-swatches-settings-wrap #settings-tabs{margin-top:30px}#woo-variation-swatches-settings-wrap #settings-tabs h2{font-size:1.5em;margin-bottom:10px}#woo-variation-swatches-settings-wrap #settings-tabs .form-table{margin-top:15px;background:#fff;border-radius:2px;box-shadow:0 0 0 1px rgba(0,0,0,.07),0 1px 1px rgba(0,0,0,.04)}#woo-variation-swatches-settings-wrap #settings-tabs .form-table tr{border-bottom:1px solid #eee;display:block}#woo-variation-swatches-settings-wrap #settings-tabs .form-table tr:last-child{border:0}#woo-variation-swatches-settings-wrap #settings-tabs .form-table th{padding:20px 10px 20px 20px}#woo-variation-swatches-settings-wrap #settings-tabs #special .form-table,#woo-variation-swatches-settings-wrap #settings-tabs #style .form-table{margin-bottom:30px}#woo-variation-swatches-settings-wrap #tutorial .form-table tr{padding:0!important}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper img{width:100%}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper ul{margin:0}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper li{overflow:hidden;display:flex;align-items:center;padding:50px 30px;margin:0;border-bottom:1px solid #ddd;position:relative}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper li:last-child{border:0}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-description-wrapper,#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-image-wrapper{float:left;padding:0 20px;box-sizing:border-box}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-image-wrapper{width:60%}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-description-wrapper{width:40%}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-description-wrapper h3{margin:0 0 20px;font-size:1.5em}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-description-wrapper .tutorial-contents{font-size:15px;line-height:1.5em;margin-bottom:20px}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-description-wrapper .tutorial-buttons .button{border-radius:3px;line-height:1;padding:13px 20px;font-size:13px;height:40px;box-shadow:none;text-shadow:none}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-description-wrapper .tutorial-buttons .button:active{-webkit-transform:translateY(0);transform:translateY(0)}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-description-wrapper .tutorial-buttons .button.button-live-demo{background-color:#fff;color:#333;border:1px solid #eee}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-description-wrapper .tutorial-buttons .button.button-live-demo:hover{background:#eee}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-description-wrapper .tutorial-buttons .button.button-docs{background-color:#36373a;color:#fff;border:1px solid #36373a}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-description-wrapper .tutorial-buttons .button.button-docs:hover{background:#5d5e61;border-color:#5d5e61}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-description-wrapper .tutorial-buttons .button.button-pro{background-color:#39b54a;color:#fff;border:1px solid #39b54a}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-description-wrapper .tutorial-buttons .button.button-pro:hover{background:#3fc851;border-color:#3fc851}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-image-wrapper{position:relative}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-image-wrapper .ribbon{position:absolute;left:-5px;top:-5px;z-index:1;overflow:hidden;width:75px;height:75px;text-align:right;margin:1px 22px}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-image-wrapper .ribbon span{font-size:10px;font-weight:700;color:#fff;text-transform:uppercase;text-align:center;line-height:20px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);width:100px;display:block;background:#bc0808;box-shadow:0 3px 10px -5px #000;position:absolute;top:19px;left:-21px}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-image-wrapper .ribbon span:before{content:"";position:absolute;left:0;top:100%;z-index:-1;border-left:3px solid #8f0808;border-right:3px solid transparent;border-bottom:3px solid transparent;border-top:3px solid #8f0808}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-image-wrapper .ribbon span:after{content:"";position:absolute;right:0;top:100%;z-index:-1;border-left:3px solid transparent;border-right:3px solid #8f0808;border-bottom:3px solid transparent;border-top:3px solid #8f0808}#woo-variation-swatches-settings-wrap .nav-tab-wrapper [data-new-text],#woo-variation-swatches-settings-wrap .nav-tab-wrapper [data-pro-text]{position:relative}#woo-variation-swatches-settings-wrap .nav-tab-wrapper [data-new-text]:after,#woo-variation-swatches-settings-wrap .nav-tab-wrapper [data-new-text]:before,#woo-variation-swatches-settings-wrap .nav-tab-wrapper [data-pro-text]:after,#woo-variation-swatches-settings-wrap .nav-tab-wrapper [data-pro-text]:before{-webkit-transform:translateY(-50%);transform:translateY(-50%);position:absolute;right:5px;top:0;color:#fff;font-size:8px;font-weight:400;text-transform:uppercase;padding:3px 5px;line-height:1;border-radius:10px}#woo-variation-swatches-settings-wrap .nav-tab-wrapper [data-pro-text]:before{content:attr(data-pro-text);background:#f44336}#woo-variation-swatches-settings-wrap .nav-tab-wrapper [data-new-text]:after{content:attr(data-new-text);background:#2196f3}#woo-variation-swatches-settings-wrap .wvs-setting-tab .wvs-new-feature-tick{position:relative;right:-5px;top:-2px;color:#fff;background:#ff5722;font-size:8px;font-weight:400;text-transform:uppercase;padding:3px 5px;line-height:1;border-radius:10px}#woo-variation-swatches-settings-wrap .wvs-setting-tab .description{font-size:small;font-style:italic}.woo-variation-swatches-pro_tab.pro-inactive a{background-color:#ff9800;color:#fff}.wvs-settings-field-content{position:relative}.wvs-show-pro-label{display:block}.wvs-show-pro-label span{padding:2px 4px;background:#fa0000;color:#fff;text-transform:uppercase;font-size:9px;border-radius:2px}.wvs-show-pro-contents{display:inline-block;color:#fa0000;font-size:11px;text-transform:uppercase;font-style:italic;text-decoration:underline;padding:0 5px}.wvs-button-wrapper .reset{color:#a00}
1
  /*!
2
+ * Variation Swatches for WooCommerce v1.1.2
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
+ * Date: 11/26/2020, 7:20:31 PM
6
  * Released under the GPLv3 license.
7
  */
8
  .button.button-danger{color:#fff;background-color:#af2d2b;border-color:#a62d2b;box-shadow:0 1px 0 #a72d2b;vertical-align:top}.button.button-danger.active,.button.button-danger:active,.button.button-danger:focus,.button.button-danger:hover{color:#fff;background:#c9302c}[data-wvsdepends]{display:none}.meta-image-field-wrapper{display:table}.meta-image-field-wrapper .button{margin:5px 0;display:block}.meta-image-field-wrapper .image-preview{display:table-cell;width:60px;padding-right:10px}.meta-image-field-wrapper .button-wrapper{display:table-cell;vertical-align:top}.gwp-rate-stars{display:inline-block;color:#ffb900;position:relative;top:3px}.gwp-rate-stars svg,.gwp-rate-stars svg a{fill:#ffb900;stroke:#ffb900;cursor:pointer}.gwp-rate-stars svg:hover,.gwp-rate-stars svg a:hover{fill:#ffb900}.gwp-rate-stars svg:hover~svg,.gwp-rate-stars svg:hover~svg a,.gwp-rate-stars svg a:hover~svg,.gwp-rate-stars svg a:hover~svg a{fill:none}#wvs-meta-preview{width:30px}.wvs-preview{width:30px;height:30px;border:1px solid #000}#woo-variation-swatches-settings-wrap #settings-tabs{margin-top:30px}#woo-variation-swatches-settings-wrap #settings-tabs h2{font-size:1.5em;margin-bottom:10px}#woo-variation-swatches-settings-wrap #settings-tabs .form-table{margin-top:15px;background:#fff;border-radius:2px;box-shadow:0 0 0 1px rgba(0,0,0,.07),0 1px 1px rgba(0,0,0,.04)}#woo-variation-swatches-settings-wrap #settings-tabs .form-table tr{border-bottom:1px solid #eee;display:block}#woo-variation-swatches-settings-wrap #settings-tabs .form-table tr:last-child{border:0}#woo-variation-swatches-settings-wrap #settings-tabs .form-table th{padding:20px 10px 20px 20px}#woo-variation-swatches-settings-wrap #settings-tabs #special .form-table,#woo-variation-swatches-settings-wrap #settings-tabs #style .form-table{margin-bottom:30px}#woo-variation-swatches-settings-wrap #tutorial .form-table tr{padding:0!important}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper img{width:100%}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper ul{margin:0}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper li{overflow:hidden;display:flex;align-items:center;padding:50px 30px;margin:0;border-bottom:1px solid #ddd;position:relative}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper li:last-child{border:0}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-description-wrapper,#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-image-wrapper{float:left;padding:0 20px;box-sizing:border-box}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-image-wrapper{width:60%}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-description-wrapper{width:40%}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-description-wrapper h3{margin:0 0 20px;font-size:1.5em}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-description-wrapper .tutorial-contents{font-size:15px;line-height:1.5em;margin-bottom:20px}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-description-wrapper .tutorial-buttons .button{border-radius:3px;line-height:1;padding:13px 20px;font-size:13px;height:40px;box-shadow:none;text-shadow:none}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-description-wrapper .tutorial-buttons .button:active{-webkit-transform:translateY(0);transform:translateY(0)}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-description-wrapper .tutorial-buttons .button.button-live-demo{background-color:#fff;color:#333;border:1px solid #eee}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-description-wrapper .tutorial-buttons .button.button-live-demo:hover{background:#eee}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-description-wrapper .tutorial-buttons .button.button-docs{background-color:#36373a;color:#fff;border:1px solid #36373a}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-description-wrapper .tutorial-buttons .button.button-docs:hover{background:#5d5e61;border-color:#5d5e61}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-description-wrapper .tutorial-buttons .button.button-pro{background-color:#39b54a;color:#fff;border:1px solid #39b54a}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-description-wrapper .tutorial-buttons .button.button-pro:hover{background:#3fc851;border-color:#3fc851}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-image-wrapper{position:relative}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-image-wrapper .ribbon{position:absolute;left:-5px;top:-5px;z-index:1;overflow:hidden;width:75px;height:75px;text-align:right;margin:1px 22px}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-image-wrapper .ribbon span{font-size:10px;font-weight:700;color:#fff;text-transform:uppercase;text-align:center;line-height:20px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);width:100px;display:block;background:#bc0808;box-shadow:0 3px 10px -5px #000;position:absolute;top:19px;left:-21px}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-image-wrapper .ribbon span:before{content:"";position:absolute;left:0;top:100%;z-index:-1;border-left:3px solid #8f0808;border-right:3px solid transparent;border-bottom:3px solid transparent;border-top:3px solid #8f0808}#woo-variation-swatches-settings-wrap #tutorial .gwp-tutorials-wrapper .tutorial-image-wrapper .ribbon span:after{content:"";position:absolute;right:0;top:100%;z-index:-1;border-left:3px solid transparent;border-right:3px solid #8f0808;border-bottom:3px solid transparent;border-top:3px solid #8f0808}#woo-variation-swatches-settings-wrap .nav-tab-wrapper [data-new-text],#woo-variation-swatches-settings-wrap .nav-tab-wrapper [data-pro-text]{position:relative}#woo-variation-swatches-settings-wrap .nav-tab-wrapper [data-new-text]:after,#woo-variation-swatches-settings-wrap .nav-tab-wrapper [data-new-text]:before,#woo-variation-swatches-settings-wrap .nav-tab-wrapper [data-pro-text]:after,#woo-variation-swatches-settings-wrap .nav-tab-wrapper [data-pro-text]:before{-webkit-transform:translateY(-50%);transform:translateY(-50%);position:absolute;right:5px;top:0;color:#fff;font-size:8px;font-weight:400;text-transform:uppercase;padding:3px 5px;line-height:1;border-radius:10px}#woo-variation-swatches-settings-wrap .nav-tab-wrapper [data-pro-text]:before{content:attr(data-pro-text);background:#f44336}#woo-variation-swatches-settings-wrap .nav-tab-wrapper [data-new-text]:after{content:attr(data-new-text);background:#2196f3}#woo-variation-swatches-settings-wrap .wvs-setting-tab .wvs-new-feature-tick{position:relative;right:-5px;top:-2px;color:#fff;background:#ff5722;font-size:8px;font-weight:400;text-transform:uppercase;padding:3px 5px;line-height:1;border-radius:10px}#woo-variation-swatches-settings-wrap .wvs-setting-tab .description{font-size:small;font-style:italic}.woo-variation-swatches-pro_tab.pro-inactive a{background-color:#ff9800;color:#fff}.wvs-settings-field-content{position:relative}.wvs-show-pro-label{display:block}.wvs-show-pro-label span{padding:2px 4px;background:#fa0000;color:#fff;text-transform:uppercase;font-size:9px;border-radius:2px}.wvs-show-pro-contents{display:inline-block;color:#fa0000;font-size:11px;text-transform:uppercase;font-style:italic;text-decoration:underline;padding:0 5px}.wvs-button-wrapper .reset{color:#a00}
assets/css/frontend-tooltip.css CHANGED
@@ -1,8 +1,8 @@
1
  /*!
2
- * Variation Swatches for WooCommerce v1.1.1
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
- * Date: 11/16/2020, 8:52:49 PM
6
  * Released under the GPLv3 license.
7
  */
8
  .woo-variation-swatches .radio-variable-item[data-wvstooltip] {
1
  /*!
2
+ * Variation Swatches for WooCommerce v1.1.2
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
+ * Date: 11/26/2020, 7:20:28 PM
6
  * Released under the GPLv3 license.
7
  */
8
  .woo-variation-swatches .radio-variable-item[data-wvstooltip] {
assets/css/frontend-tooltip.min.css CHANGED
@@ -1,8 +1,8 @@
1
  /*!
2
- * Variation Swatches for WooCommerce v1.1.1
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
- * Date: 11/16/2020, 8:52:54 PM
6
  * Released under the GPLv3 license.
7
  */
8
  .woo-variation-swatches .radio-variable-item[data-wvstooltip]{position:relative}.woo-variation-swatches .radio-variable-item[data-wvstooltip]:after,.woo-variation-swatches .radio-variable-item[data-wvstooltip]:before{left:8px;bottom:100%}.woo-variation-swatches .radio-variable-item .image-tooltip-wrapper{-webkit-transform:translateX(-50%);transform:translateX(-50%);left:8px}.woo-variation-swatches.wvs-archive-align-center .wvs-archive-variation-wrapper .radio-variable-item[data-wvstooltip]:after,.woo-variation-swatches.wvs-archive-align-center .wvs-archive-variation-wrapper .radio-variable-item[data-wvstooltip]:before{left:50%}.woo-variation-swatches.wvs-archive-align-center .wvs-archive-variation-wrapper .radio-variable-item .image-tooltip-wrapper{-webkit-transform:translateX(-50%);transform:translateX(-50%);left:50%}.woo-variation-swatches.wvs-archive-align-right .wvs-archive-variation-wrapper .radio-variable-item[data-wvstooltip]:after,.woo-variation-swatches.wvs-archive-align-right .wvs-archive-variation-wrapper .radio-variable-item[data-wvstooltip]:before{left:100%}.woo-variation-swatches.wvs-archive-align-right .wvs-archive-variation-wrapper .radio-variable-item .image-tooltip-wrapper{-webkit-transform:translateX(-50%);transform:translateX(-50%);left:100%}.variable-items-wrapper .wvs-has-image-tooltip,.variable-items-wrapper [data-wvstooltip]{position:relative;cursor:pointer;outline:none}.variable-items-wrapper .wvs-has-image-tooltip:after,.variable-items-wrapper .wvs-has-image-tooltip:before,.variable-items-wrapper [data-wvstooltip]:after,.variable-items-wrapper [data-wvstooltip]:before{visibility:hidden;opacity:0;pointer-events:none;box-sizing:inherit;position:absolute;bottom:130%;left:50%;z-index:999;-webkit-transform:translateZ(0);transform:translateZ(0);box-shadow:0 7px 15px rgba(0,0,0,.3);transition:opacity .3s linear,bottom .3s linear}.variable-items-wrapper .wvs-has-image-tooltip:before,.variable-items-wrapper [data-wvstooltip]:before{margin-bottom:5px;-webkit-transform:translateX(-50%);transform:translateX(-50%);padding:7px;border-radius:3px;background-color:#000;background-color:rgba(51,51,51,.9);color:#fff;text-align:center;font-size:14px;line-height:1.2}.variable-items-wrapper [data-wvstooltip]:before{min-width:100px;content:attr(data-wvstooltip)}.variable-items-wrapper .wvs-has-image-tooltip:before{content:attr(data-title);background-image:var(--tooltip-background);background-repeat:no-repeat;width:var(--tooltip-width);height:calc(var(--tooltip-height) + 20px);background-size:contain;border:2px solid;background-position:top;padding:0;line-height:20px;display:flex;align-items:flex-end;justify-content:center;font-size:12px;-webkit-backface-visibility:hidden;backface-visibility:hidden}.variable-items-wrapper .wvs-has-image-tooltip:after,.variable-items-wrapper [data-wvstooltip]:after{margin-left:-5px;width:0;border-top:5px solid #000;border-top:5px solid rgba(51,51,51,.9);border-right:5px solid transparent;border-left:5px solid transparent;content:" ";font-size:0;line-height:0}.variable-items-wrapper .wvs-has-image-tooltip:hover:after,.variable-items-wrapper .wvs-has-image-tooltip:hover:before,.variable-items-wrapper [data-wvstooltip]:hover:after,.variable-items-wrapper [data-wvstooltip]:hover:before{bottom:120%;visibility:visible;opacity:1}
1
  /*!
2
+ * Variation Swatches for WooCommerce v1.1.2
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
+ * Date: 11/26/2020, 7:20:31 PM
6
  * Released under the GPLv3 license.
7
  */
8
  .woo-variation-swatches .radio-variable-item[data-wvstooltip]{position:relative}.woo-variation-swatches .radio-variable-item[data-wvstooltip]:after,.woo-variation-swatches .radio-variable-item[data-wvstooltip]:before{left:8px;bottom:100%}.woo-variation-swatches .radio-variable-item .image-tooltip-wrapper{-webkit-transform:translateX(-50%);transform:translateX(-50%);left:8px}.woo-variation-swatches.wvs-archive-align-center .wvs-archive-variation-wrapper .radio-variable-item[data-wvstooltip]:after,.woo-variation-swatches.wvs-archive-align-center .wvs-archive-variation-wrapper .radio-variable-item[data-wvstooltip]:before{left:50%}.woo-variation-swatches.wvs-archive-align-center .wvs-archive-variation-wrapper .radio-variable-item .image-tooltip-wrapper{-webkit-transform:translateX(-50%);transform:translateX(-50%);left:50%}.woo-variation-swatches.wvs-archive-align-right .wvs-archive-variation-wrapper .radio-variable-item[data-wvstooltip]:after,.woo-variation-swatches.wvs-archive-align-right .wvs-archive-variation-wrapper .radio-variable-item[data-wvstooltip]:before{left:100%}.woo-variation-swatches.wvs-archive-align-right .wvs-archive-variation-wrapper .radio-variable-item .image-tooltip-wrapper{-webkit-transform:translateX(-50%);transform:translateX(-50%);left:100%}.variable-items-wrapper .wvs-has-image-tooltip,.variable-items-wrapper [data-wvstooltip]{position:relative;cursor:pointer;outline:none}.variable-items-wrapper .wvs-has-image-tooltip:after,.variable-items-wrapper .wvs-has-image-tooltip:before,.variable-items-wrapper [data-wvstooltip]:after,.variable-items-wrapper [data-wvstooltip]:before{visibility:hidden;opacity:0;pointer-events:none;box-sizing:inherit;position:absolute;bottom:130%;left:50%;z-index:999;-webkit-transform:translateZ(0);transform:translateZ(0);box-shadow:0 7px 15px rgba(0,0,0,.3);transition:opacity .3s linear,bottom .3s linear}.variable-items-wrapper .wvs-has-image-tooltip:before,.variable-items-wrapper [data-wvstooltip]:before{margin-bottom:5px;-webkit-transform:translateX(-50%);transform:translateX(-50%);padding:7px;border-radius:3px;background-color:#000;background-color:rgba(51,51,51,.9);color:#fff;text-align:center;font-size:14px;line-height:1.2}.variable-items-wrapper [data-wvstooltip]:before{min-width:100px;content:attr(data-wvstooltip)}.variable-items-wrapper .wvs-has-image-tooltip:before{content:attr(data-title);background-image:var(--tooltip-background);background-repeat:no-repeat;width:var(--tooltip-width);height:calc(var(--tooltip-height) + 20px);background-size:contain;border:2px solid;background-position:top;padding:0;line-height:20px;display:flex;align-items:flex-end;justify-content:center;font-size:12px;-webkit-backface-visibility:hidden;backface-visibility:hidden}.variable-items-wrapper .wvs-has-image-tooltip:after,.variable-items-wrapper [data-wvstooltip]:after{margin-left:-5px;width:0;border-top:5px solid #000;border-top:5px solid rgba(51,51,51,.9);border-right:5px solid transparent;border-left:5px solid transparent;content:" ";font-size:0;line-height:0}.variable-items-wrapper .wvs-has-image-tooltip:hover:after,.variable-items-wrapper .wvs-has-image-tooltip:hover:before,.variable-items-wrapper [data-wvstooltip]:hover:after,.variable-items-wrapper [data-wvstooltip]:hover:before{bottom:120%;visibility:visible;opacity:1}
assets/css/frontend.css CHANGED
@@ -1,8 +1,8 @@
1
  /*!
2
- * Variation Swatches for WooCommerce v1.1.1
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
- * Date: 11/16/2020, 8:52:49 PM
6
  * Released under the GPLv3 license.
7
  */
8
  .woo-variation-swatches .woo-variation-raw-select,
1
  /*!
2
+ * Variation Swatches for WooCommerce v1.1.2
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
+ * Date: 11/26/2020, 7:20:28 PM
6
  * Released under the GPLv3 license.
7
  */
8
  .woo-variation-swatches .woo-variation-raw-select,
assets/css/frontend.min.css CHANGED
@@ -1,8 +1,8 @@
1
  /*!
2
- * Variation Swatches for WooCommerce v1.1.1
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
- * Date: 11/16/2020, 8:52:54 PM
6
  * Released under the GPLv3 license.
7
  */
8
  .woo-variation-swatches .woo-variation-raw-select,.woo-variation-swatches .woo-variation-raw-select+.select2{display:none!important}.woo-variation-swatches .variable-items-wrapper{display:flex;flex-wrap:wrap;margin:0!important;padding:0;list-style:none}.woo-variation-swatches .variable-items-wrapper .variable-item{margin:0;padding:0;list-style:none;transition:all .2s ease;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;outline:none}.woo-variation-swatches .variable-items-wrapper .variable-item.variation-disabled{display:none!important}.woo-variation-swatches .variable-items-wrapper .variable-item img{margin:0;padding:0;width:100%;height:100%;pointer-events:none}.woo-variation-swatches .variable-items-wrapper .variable-item span{pointer-events:none}.woo-variation-swatches .variable-items-wrapper.radio-variable-wrapper{display:block}.woo-variation-swatches .variable-items-wrapper.radio-variable-wrapper .radio-variable-item{box-sizing:border-box;display:block;list-style:none;cursor:pointer;margin:0}.woo-variation-swatches .variable-items-wrapper.radio-variable-wrapper .radio-variable-item input,.woo-variation-swatches .variable-items-wrapper.radio-variable-wrapper .radio-variable-item label{cursor:pointer}.woo-variation-swatches .variable-items-wrapper.radio-variable-wrapper .radio-variable-item input{width:auto;margin-right:5px}.woo-variation-swatches .variable-items-wrapper.radio-variable-wrapper .radio-variable-item label{font-weight:400;font-size:14px;display:inline-block}.woo-variation-swatches .variable-items-wrapper .variable-item:not(.radio-variable-item){box-sizing:border-box;cursor:pointer;display:flex;justify-content:center;align-items:center;background-color:#fff;box-shadow:0 0 0 1px rgba(0,0,0,.3);padding:2px;margin:4px 8px 4px 0}.woo-variation-swatches .variable-items-wrapper .variable-item:not(.radio-variable-item):last-of-type{margin-right:0}.woo-variation-swatches .variable-items-wrapper .variable-item:not(.radio-variable-item):hover{box-shadow:0 0 0 3px rgba(0,0,0,.1)}.woo-variation-swatches .variable-items-wrapper .variable-item:not(.radio-variable-item):focus{box-shadow:0 0 0 3px rgba(0,0,0,.3)}.woo-variation-swatches .variable-items-wrapper .variable-item:not(.radio-variable-item).selected,.woo-variation-swatches .variable-items-wrapper .variable-item:not(.radio-variable-item).selected:hover{box-shadow:0 0 0 2px rgba(0,0,0,.9)}.woo-variation-swatches .variable-items-wrapper .variable-item:not(.radio-variable-item).color-variable-item .variable-item-span-color{width:100%;height:100%;position:relative}.woo-variation-swatches .variable-items-wrapper .variable-item:not(.radio-variable-item).color-variable-item .variable-item-span-color:after{position:absolute;content:"";width:100%;height:100%;top:0;left:0;box-shadow:inset 0 0 1px 0 rgba(0,0,0,.5)}.woo-variation-swatches .variable-items-wrapper .variable-item:not(.radio-variable-item).button-variable-item{text-align:center}.woo-variation-swatches.wvs-style-rounded .variable-items-wrapper .variable-item,.woo-variation-swatches.wvs-style-rounded .variable-items-wrapper .variable-item .variable-item-span,.woo-variation-swatches.wvs-style-rounded .variable-items-wrapper .variable-item .variable-item-span:after,.woo-variation-swatches.wvs-style-rounded .variable-items-wrapper .variable-item img{border-radius:100%}.woo-variation-swatches.wvs-style-squared .variable-items-wrapper .variable-item{border-radius:2px}.woo-variation-swatches.wvs-style-squared .variable-items-wrapper .variable-item.button-variable-item{width:auto}.woo-variation-swatches.wvs-style-squared .variable-items-wrapper .variable-item.button-variable-item .variable-item-span{padding:0 5px}.woo-variation-swatches.wvs-style-squared .variable-items-wrapper .variable-item.color-variable-item span:after{border-radius:0}.woo-variation-swatches.wvs-attr-behavior-blur .variable-item:not(.radio-variable-item).disabled,.woo-variation-swatches.wvs-attr-behavior-blur .variable-item:not(.radio-variable-item).disabled:hover{box-shadow:0 0 0 1px rgba(0,0,0,.05);pointer-events:none;cursor:not-allowed;position:relative;overflow:hidden}.woo-variation-swatches.wvs-attr-behavior-blur .variable-item:not(.radio-variable-item).disabled:hover img,.woo-variation-swatches.wvs-attr-behavior-blur .variable-item:not(.radio-variable-item).disabled:hover span,.woo-variation-swatches.wvs-attr-behavior-blur .variable-item:not(.radio-variable-item).disabled img,.woo-variation-swatches.wvs-attr-behavior-blur .variable-item:not(.radio-variable-item).disabled span{opacity:.3}.woo-variation-swatches.wvs-attr-behavior-blur .variable-item:not(.radio-variable-item).disabled:after,.woo-variation-swatches.wvs-attr-behavior-blur .variable-item:not(.radio-variable-item).disabled:before,.woo-variation-swatches.wvs-attr-behavior-blur .variable-item:not(.radio-variable-item).disabled:hover:after,.woo-variation-swatches.wvs-attr-behavior-blur .variable-item:not(.radio-variable-item).disabled:hover:before{position:absolute;content:" "!important;width:100%;height:1px;background:red!important;left:0;right:0;bottom:0;top:50%;visibility:visible;opacity:1;border:0;margin:0!important;padding:0!important;min-width:auto;-webkit-transform-origin:center;transform-origin:center;z-index:0}.woo-variation-swatches.wvs-attr-behavior-blur .variable-item:not(.radio-variable-item).disabled:before,.woo-variation-swatches.wvs-attr-behavior-blur .variable-item:not(.radio-variable-item).disabled:hover:before{-webkit-transform:rotate(45deg);transform:rotate(45deg)}.woo-variation-swatches.wvs-attr-behavior-blur .variable-item:not(.radio-variable-item).disabled:after,.woo-variation-swatches.wvs-attr-behavior-blur .variable-item:not(.radio-variable-item).disabled:hover:after{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.woo-variation-swatches.wvs-attr-behavior-blur .radio-variable-item.disabled:hover input,.woo-variation-swatches.wvs-attr-behavior-blur .radio-variable-item.disabled:hover label,.woo-variation-swatches.wvs-attr-behavior-blur .radio-variable-item.disabled input,.woo-variation-swatches.wvs-attr-behavior-blur .radio-variable-item.disabled label{cursor:not-allowed;text-decoration:line-through;opacity:.5}.woo-variation-swatches.wvs-attr-behavior-blur .radio-variable-item.disabled:after,.woo-variation-swatches.wvs-attr-behavior-blur .radio-variable-item.disabled:before,.woo-variation-swatches.wvs-attr-behavior-blur .radio-variable-item.disabled:hover:after,.woo-variation-swatches.wvs-attr-behavior-blur .radio-variable-item.disabled:hover:before{display:none}.woo-variation-swatches.wvs-attr-behavior-blur-no-cross .variable-item:not(.radio-variable-item).disabled,.woo-variation-swatches.wvs-attr-behavior-blur-no-cross .variable-item:not(.radio-variable-item).disabled:hover{pointer-events:none;box-shadow:0 0 0 1px rgba(0,0,0,.05);position:relative;overflow:hidden}.woo-variation-swatches.wvs-attr-behavior-blur-no-cross .variable-item:not(.radio-variable-item).disabled:hover img,.woo-variation-swatches.wvs-attr-behavior-blur-no-cross .variable-item:not(.radio-variable-item).disabled:hover span,.woo-variation-swatches.wvs-attr-behavior-blur-no-cross .variable-item:not(.radio-variable-item).disabled img,.woo-variation-swatches.wvs-attr-behavior-blur-no-cross .variable-item:not(.radio-variable-item).disabled span{opacity:.3}.woo-variation-swatches.wvs-attr-behavior-blur-no-cross .radio-variable-item.disabled,.woo-variation-swatches.wvs-attr-behavior-blur-no-cross .radio-variable-item.disabled:hover{overflow:hidden}.woo-variation-swatches.wvs-attr-behavior-blur-no-cross .radio-variable-item.disabled:hover input,.woo-variation-swatches.wvs-attr-behavior-blur-no-cross .radio-variable-item.disabled:hover label,.woo-variation-swatches.wvs-attr-behavior-blur-no-cross .radio-variable-item.disabled input,.woo-variation-swatches.wvs-attr-behavior-blur-no-cross .radio-variable-item.disabled label{pointer-events:none;opacity:.3}.woo-variation-swatches.wvs-attr-behavior-hide .variable-item.disabled{opacity:0;visibility:hidden;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center;transform-origin:center;width:0!important;height:0!important;padding:0!important;margin:0!important;min-width:0!important;min-height:0!important}.woo-variation-swatches.wvs-attr-behavior-hide .variable-item.disabled.radio-variable-item{width:auto!important}.woo-variation-swatches.rtl table.variations td.label{padding-left:15px;padding-right:0;text-align:left}.woo-variation-swatches.rtl .variable-items-wrapper .variable-item{text-align:right}.woo-variation-swatches.rtl .variable-items-wrapper .variable-item:not(.radio-variable-item){margin:4px 0 4px 8px}.woo-variation-swatches.rtl .variable-items-wrapper.radio-variable-wrapper .radio-variable-item input{margin-right:0;margin-left:5px}.woo-variation-swatches.woocommerce .product.elementor table.variations td.value:before{display:none!important}.woo-variation-swatches.woo-variation-swatches-ie11 .variable-items-wrapper{display:block!important}.woo-variation-swatches.woo-variation-swatches-ie11 .variable-items-wrapper .variable-item:not(.radio-variable-item){float:left}.woo-variation-swatches.wvs-show-label .variations td{display:block;width:auto!important}.woo-variation-swatches.wvs-show-label .variations td .woo-selected-variation-item-name,.woo-variation-swatches.wvs-show-label .variations td label{display:inline-block}
1
  /*!
2
+ * Variation Swatches for WooCommerce v1.1.2
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
+ * Date: 11/26/2020, 7:20:31 PM
6
  * Released under the GPLv3 license.
7
  */
8
  .woo-variation-swatches .woo-variation-raw-select,.woo-variation-swatches .woo-variation-raw-select+.select2{display:none!important}.woo-variation-swatches .variable-items-wrapper{display:flex;flex-wrap:wrap;margin:0!important;padding:0;list-style:none}.woo-variation-swatches .variable-items-wrapper .variable-item{margin:0;padding:0;list-style:none;transition:all .2s ease;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;outline:none}.woo-variation-swatches .variable-items-wrapper .variable-item.variation-disabled{display:none!important}.woo-variation-swatches .variable-items-wrapper .variable-item img{margin:0;padding:0;width:100%;height:100%;pointer-events:none}.woo-variation-swatches .variable-items-wrapper .variable-item span{pointer-events:none}.woo-variation-swatches .variable-items-wrapper.radio-variable-wrapper{display:block}.woo-variation-swatches .variable-items-wrapper.radio-variable-wrapper .radio-variable-item{box-sizing:border-box;display:block;list-style:none;cursor:pointer;margin:0}.woo-variation-swatches .variable-items-wrapper.radio-variable-wrapper .radio-variable-item input,.woo-variation-swatches .variable-items-wrapper.radio-variable-wrapper .radio-variable-item label{cursor:pointer}.woo-variation-swatches .variable-items-wrapper.radio-variable-wrapper .radio-variable-item input{width:auto;margin-right:5px}.woo-variation-swatches .variable-items-wrapper.radio-variable-wrapper .radio-variable-item label{font-weight:400;font-size:14px;display:inline-block}.woo-variation-swatches .variable-items-wrapper .variable-item:not(.radio-variable-item){box-sizing:border-box;cursor:pointer;display:flex;justify-content:center;align-items:center;background-color:#fff;box-shadow:0 0 0 1px rgba(0,0,0,.3);padding:2px;margin:4px 8px 4px 0}.woo-variation-swatches .variable-items-wrapper .variable-item:not(.radio-variable-item):last-of-type{margin-right:0}.woo-variation-swatches .variable-items-wrapper .variable-item:not(.radio-variable-item):hover{box-shadow:0 0 0 3px rgba(0,0,0,.1)}.woo-variation-swatches .variable-items-wrapper .variable-item:not(.radio-variable-item):focus{box-shadow:0 0 0 3px rgba(0,0,0,.3)}.woo-variation-swatches .variable-items-wrapper .variable-item:not(.radio-variable-item).selected,.woo-variation-swatches .variable-items-wrapper .variable-item:not(.radio-variable-item).selected:hover{box-shadow:0 0 0 2px rgba(0,0,0,.9)}.woo-variation-swatches .variable-items-wrapper .variable-item:not(.radio-variable-item).color-variable-item .variable-item-span-color{width:100%;height:100%;position:relative}.woo-variation-swatches .variable-items-wrapper .variable-item:not(.radio-variable-item).color-variable-item .variable-item-span-color:after{position:absolute;content:"";width:100%;height:100%;top:0;left:0;box-shadow:inset 0 0 1px 0 rgba(0,0,0,.5)}.woo-variation-swatches .variable-items-wrapper .variable-item:not(.radio-variable-item).button-variable-item{text-align:center}.woo-variation-swatches.wvs-style-rounded .variable-items-wrapper .variable-item,.woo-variation-swatches.wvs-style-rounded .variable-items-wrapper .variable-item .variable-item-span,.woo-variation-swatches.wvs-style-rounded .variable-items-wrapper .variable-item .variable-item-span:after,.woo-variation-swatches.wvs-style-rounded .variable-items-wrapper .variable-item img{border-radius:100%}.woo-variation-swatches.wvs-style-squared .variable-items-wrapper .variable-item{border-radius:2px}.woo-variation-swatches.wvs-style-squared .variable-items-wrapper .variable-item.button-variable-item{width:auto}.woo-variation-swatches.wvs-style-squared .variable-items-wrapper .variable-item.button-variable-item .variable-item-span{padding:0 5px}.woo-variation-swatches.wvs-style-squared .variable-items-wrapper .variable-item.color-variable-item span:after{border-radius:0}.woo-variation-swatches.wvs-attr-behavior-blur .variable-item:not(.radio-variable-item).disabled,.woo-variation-swatches.wvs-attr-behavior-blur .variable-item:not(.radio-variable-item).disabled:hover{box-shadow:0 0 0 1px rgba(0,0,0,.05);pointer-events:none;cursor:not-allowed;position:relative;overflow:hidden}.woo-variation-swatches.wvs-attr-behavior-blur .variable-item:not(.radio-variable-item).disabled:hover img,.woo-variation-swatches.wvs-attr-behavior-blur .variable-item:not(.radio-variable-item).disabled:hover span,.woo-variation-swatches.wvs-attr-behavior-blur .variable-item:not(.radio-variable-item).disabled img,.woo-variation-swatches.wvs-attr-behavior-blur .variable-item:not(.radio-variable-item).disabled span{opacity:.3}.woo-variation-swatches.wvs-attr-behavior-blur .variable-item:not(.radio-variable-item).disabled:after,.woo-variation-swatches.wvs-attr-behavior-blur .variable-item:not(.radio-variable-item).disabled:before,.woo-variation-swatches.wvs-attr-behavior-blur .variable-item:not(.radio-variable-item).disabled:hover:after,.woo-variation-swatches.wvs-attr-behavior-blur .variable-item:not(.radio-variable-item).disabled:hover:before{position:absolute;content:" "!important;width:100%;height:1px;background:red!important;left:0;right:0;bottom:0;top:50%;visibility:visible;opacity:1;border:0;margin:0!important;padding:0!important;min-width:auto;-webkit-transform-origin:center;transform-origin:center;z-index:0}.woo-variation-swatches.wvs-attr-behavior-blur .variable-item:not(.radio-variable-item).disabled:before,.woo-variation-swatches.wvs-attr-behavior-blur .variable-item:not(.radio-variable-item).disabled:hover:before{-webkit-transform:rotate(45deg);transform:rotate(45deg)}.woo-variation-swatches.wvs-attr-behavior-blur .variable-item:not(.radio-variable-item).disabled:after,.woo-variation-swatches.wvs-attr-behavior-blur .variable-item:not(.radio-variable-item).disabled:hover:after{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.woo-variation-swatches.wvs-attr-behavior-blur .radio-variable-item.disabled:hover input,.woo-variation-swatches.wvs-attr-behavior-blur .radio-variable-item.disabled:hover label,.woo-variation-swatches.wvs-attr-behavior-blur .radio-variable-item.disabled input,.woo-variation-swatches.wvs-attr-behavior-blur .radio-variable-item.disabled label{cursor:not-allowed;text-decoration:line-through;opacity:.5}.woo-variation-swatches.wvs-attr-behavior-blur .radio-variable-item.disabled:after,.woo-variation-swatches.wvs-attr-behavior-blur .radio-variable-item.disabled:before,.woo-variation-swatches.wvs-attr-behavior-blur .radio-variable-item.disabled:hover:after,.woo-variation-swatches.wvs-attr-behavior-blur .radio-variable-item.disabled:hover:before{display:none}.woo-variation-swatches.wvs-attr-behavior-blur-no-cross .variable-item:not(.radio-variable-item).disabled,.woo-variation-swatches.wvs-attr-behavior-blur-no-cross .variable-item:not(.radio-variable-item).disabled:hover{pointer-events:none;box-shadow:0 0 0 1px rgba(0,0,0,.05);position:relative;overflow:hidden}.woo-variation-swatches.wvs-attr-behavior-blur-no-cross .variable-item:not(.radio-variable-item).disabled:hover img,.woo-variation-swatches.wvs-attr-behavior-blur-no-cross .variable-item:not(.radio-variable-item).disabled:hover span,.woo-variation-swatches.wvs-attr-behavior-blur-no-cross .variable-item:not(.radio-variable-item).disabled img,.woo-variation-swatches.wvs-attr-behavior-blur-no-cross .variable-item:not(.radio-variable-item).disabled span{opacity:.3}.woo-variation-swatches.wvs-attr-behavior-blur-no-cross .radio-variable-item.disabled,.woo-variation-swatches.wvs-attr-behavior-blur-no-cross .radio-variable-item.disabled:hover{overflow:hidden}.woo-variation-swatches.wvs-attr-behavior-blur-no-cross .radio-variable-item.disabled:hover input,.woo-variation-swatches.wvs-attr-behavior-blur-no-cross .radio-variable-item.disabled:hover label,.woo-variation-swatches.wvs-attr-behavior-blur-no-cross .radio-variable-item.disabled input,.woo-variation-swatches.wvs-attr-behavior-blur-no-cross .radio-variable-item.disabled label{pointer-events:none;opacity:.3}.woo-variation-swatches.wvs-attr-behavior-hide .variable-item.disabled{opacity:0;visibility:hidden;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center;transform-origin:center;width:0!important;height:0!important;padding:0!important;margin:0!important;min-width:0!important;min-height:0!important}.woo-variation-swatches.wvs-attr-behavior-hide .variable-item.disabled.radio-variable-item{width:auto!important}.woo-variation-swatches.rtl table.variations td.label{padding-left:15px;padding-right:0;text-align:left}.woo-variation-swatches.rtl .variable-items-wrapper .variable-item{text-align:right}.woo-variation-swatches.rtl .variable-items-wrapper .variable-item:not(.radio-variable-item){margin:4px 0 4px 8px}.woo-variation-swatches.rtl .variable-items-wrapper.radio-variable-wrapper .radio-variable-item input{margin-right:0;margin-left:5px}.woo-variation-swatches.woocommerce .product.elementor table.variations td.value:before{display:none!important}.woo-variation-swatches.woo-variation-swatches-ie11 .variable-items-wrapper{display:block!important}.woo-variation-swatches.woo-variation-swatches-ie11 .variable-items-wrapper .variable-item:not(.radio-variable-item){float:left}.woo-variation-swatches.wvs-show-label .variations td{display:block;width:auto!important}.woo-variation-swatches.wvs-show-label .variations td .woo-selected-variation-item-name,.woo-variation-swatches.wvs-show-label .variations td label{display:inline-block}
assets/css/gwp-admin-notice.css CHANGED
@@ -1,8 +1,8 @@
1
  /*!
2
- * Variation Swatches for WooCommerce v1.1.1
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
- * Date: 11/16/2020, 8:52:49 PM
6
  * Released under the GPLv3 license.
7
  */
8
  .gwp-live-feed-contents {
1
  /*!
2
+ * Variation Swatches for WooCommerce v1.1.2
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
+ * Date: 11/26/2020, 7:20:28 PM
6
  * Released under the GPLv3 license.
7
  */
8
  .gwp-live-feed-contents {
assets/css/gwp-admin-notice.min.css CHANGED
@@ -1,8 +1,8 @@
1
  /*!
2
- * Variation Swatches for WooCommerce v1.1.1
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
- * Date: 11/16/2020, 8:52:54 PM
6
  * Released under the GPLv3 license.
7
  */
8
  .gwp-live-feed-contents{position:relative;clear:both;overflow:hidden}.gwp-live-feed-contents.gwp-ad-gallery:before,.gwp-live-feed-contents.notice-info:before{content:"\F161";background:#41a1d3}.gwp-live-feed-contents.notice-success:before{content:"\F147";background:#46b450}.gwp-live-feed-contents.notice-error:before{content:"\F158";background:#dc3232}.gwp-live-feed-contents.notice-warning:before{content:"\F534";background:#f6ba33}.gwp-live-feed-contents.gwp-notice-required:before{content:"\F463";background:#ce3100;text-shadow:0 -1px 1px #ce3100}.gwp-live-feed-contents.gwp-notice-recommended:before{content:"\F529";background:#3d4046;text-shadow:0 -1px 1px #3d4046}.gwp-live-feed-contents.gwp-ad-gallery,.gwp-live-feed-contents.gwp-notice-recommended,.gwp-live-feed-contents.gwp-notice-required,.gwp-live-feed-contents.notice-error,.gwp-live-feed-contents.notice-info,.gwp-live-feed-contents.notice-success,.gwp-live-feed-contents.notice-warning{display:flex;align-items:stretch;padding:0;border-radius:4px}.gwp-live-feed-contents.gwp-ad-gallery:before,.gwp-live-feed-contents.gwp-notice-recommended:before,.gwp-live-feed-contents.gwp-notice-required:before,.gwp-live-feed-contents.notice-error:before,.gwp-live-feed-contents.notice-info:before,.gwp-live-feed-contents.notice-success:before,.gwp-live-feed-contents.notice-warning:before{font-family:dashicons;font-size:20px;color:#fff;padding:10px;display:flex;align-items:center}.gwp-live-feed-contents.gwp-ad-gallery .feed-message-wrapper,.gwp-live-feed-contents.gwp-notice-recommended .feed-message-wrapper,.gwp-live-feed-contents.gwp-notice-required .feed-message-wrapper,.gwp-live-feed-contents.notice-error .feed-message-wrapper,.gwp-live-feed-contents.notice-info .feed-message-wrapper,.gwp-live-feed-contents.notice-success .feed-message-wrapper,.gwp-live-feed-contents.notice-warning .feed-message-wrapper{padding:10px 60px 10px 20px}.gwp-live-feed-contents.gwp-notice-discount{border-radius:5px;border:0;display:flex;align-items:center;padding:0;max-width:750px;margin-left:auto;margin-right:auto;background:#594679}.gwp-live-feed-contents.gwp-notice-discount .feed-thumbnail-wrapper .attachment-thumbnail{display:block}.gwp-live-feed-contents.gwp-notice-discount .feed-message-wrapper{display:flex;justify-content:space-between;align-items:center;width:100%;color:#fff;text-shadow:0 -1px 1px #594679;padding:20px 30px 20px 20px}.gwp-live-feed-contents.gwp-notice-discount .feed-message-wrapper p{font-size:14px;margin:0;padding:0}.gwp-live-feed-contents.gwp-notice-discount .feed-message-wrapper span.big{font-weight:400;font-size:18px}.gwp-live-feed-contents.gwp-notice-discount .feed-message-wrapper strong{font-weight:800}.gwp-live-feed-contents.gwp-notice-discount .feed-message-wrapper .button-primary{font-size:16px;border-radius:30px;padding:0 25px;border:0;height:40px;line-height:40px}.gwp-live-feed-contents.gwp-notice-discount .gwp-live-feed-close{color:#fff;opacity:.5;font-size:12px}.gwp-live-feed-contents.gwp-notice-discount .gwp-live-feed-close:hover{opacity:1}.gwp-live-feed-contents.gwp-notice-discount .gwp-live-feed-close:before{color:#fff}.gwp-live-feed-contents.gwp-notice-pro{border-radius:5px;border:0;display:flex;align-items:center;padding:0;max-width:750px;margin-left:auto;margin-right:auto;background:#2196f3}.gwp-live-feed-contents.gwp-notice-pro .feed-message-wrapper{display:flex;justify-content:space-between;align-items:center;width:100%;color:#fff;text-shadow:0 -1px 1px #2196f3;padding:20px}.gwp-live-feed-contents.gwp-notice-pro .feed-message-wrapper p{font-size:14px;margin:0;padding:0}.gwp-live-feed-contents.gwp-notice-pro .feed-message-wrapper span.big{font-weight:400;font-size:18px}.gwp-live-feed-contents.gwp-notice-pro .feed-message-wrapper strong{font-weight:800}.gwp-live-feed-contents.gwp-notice-pro .feed-message-wrapper .button-upgrade{position:relative;font-size:16px;color:#fff;font-weight:600;text-decoration:none;padding:25px 25px 25px 80px;display:block;margin:-20px;background:#673ab7;text-shadow:0 -1px 1px #673ab7}.gwp-live-feed-contents.gwp-notice-pro .feed-message-wrapper .button-upgrade small{font-weight:300;display:block}.gwp-live-feed-contents.gwp-notice-pro .feed-message-wrapper .button-upgrade i{position:absolute;left:25px;font-size:36px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);width:36px;height:36px}.gwp-live-feed-contents.gwp-notice-pro .feed-message-wrapper .button-upgrade:hover{background:#305af3;text-shadow:0 -1px 1px #305af3}.gwp-live-feed-contents.gwp-notice-pro .gwp-live-feed-close{color:#fff;opacity:.5;font-size:12px;z-index:1}.gwp-live-feed-contents.gwp-notice-pro .gwp-live-feed-close:hover{opacity:1}.gwp-live-feed-contents.gwp-notice-pro .gwp-live-feed-close:before{color:#fff}.gwp-live-feed-contents.gwp-notice-new{border:0;padding:0;max-width:750px;margin-left:auto;margin-right:auto;background:transparent;box-shadow:none}.gwp-live-feed-contents.gwp-notice-new .feed-message-wrapper,.gwp-live-feed-contents.gwp-notice-new .feed-message-wrapper img,.gwp-live-feed-contents.gwp-notice-new .feed-message-wrapper p{padding:0;margin:0}.gwp-live-feed-contents.gwp-notice-new .gwp-live-feed-close{color:rgba(0,0,0,.5);opacity:.5;font-size:12px}.gwp-live-feed-contents.gwp-notice-new .gwp-live-feed-close:hover{opacity:1}.gwp-live-feed-contents.gwp-notice-new .gwp-live-feed-close:before{color:rgba(0,0,0,.5)}.gwp-live-feed-contents .button-primary{background:#56bfd4;border-color:#3a9db1;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.3);text-shadow:0 -1px 1px #238ea5}.gwp-live-feed-contents .button-primary:active,.gwp-live-feed-contents .button-primary:focus,.gwp-live-feed-contents .button-primary:hover{background:#39b1ca;border-color:#3a9db1}.gwp-live-feed-contents .gwp-live-feed-close{display:flex;right:0;text-decoration:none;padding:10px 10px 10px 25px}.gwp-live-feed-contents .gwp-live-feed-close:before{display:inline-block}.gwp-live-feed-contents .gwp-live-feed-close-plain{display:flex;right:0;text-decoration:none;padding:15px}.gwp-live-feed-contents .gwp-live-feed-close-plain:before{display:inline-block}.wp-admin.rtl .gwp-live-feed-contents .gwp-live-feed-close-plain{left:0;right:auto}
1
  /*!
2
+ * Variation Swatches for WooCommerce v1.1.2
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
+ * Date: 11/26/2020, 7:20:31 PM
6
  * Released under the GPLv3 license.
7
  */
8
  .gwp-live-feed-contents{position:relative;clear:both;overflow:hidden}.gwp-live-feed-contents.gwp-ad-gallery:before,.gwp-live-feed-contents.notice-info:before{content:"\F161";background:#41a1d3}.gwp-live-feed-contents.notice-success:before{content:"\F147";background:#46b450}.gwp-live-feed-contents.notice-error:before{content:"\F158";background:#dc3232}.gwp-live-feed-contents.notice-warning:before{content:"\F534";background:#f6ba33}.gwp-live-feed-contents.gwp-notice-required:before{content:"\F463";background:#ce3100;text-shadow:0 -1px 1px #ce3100}.gwp-live-feed-contents.gwp-notice-recommended:before{content:"\F529";background:#3d4046;text-shadow:0 -1px 1px #3d4046}.gwp-live-feed-contents.gwp-ad-gallery,.gwp-live-feed-contents.gwp-notice-recommended,.gwp-live-feed-contents.gwp-notice-required,.gwp-live-feed-contents.notice-error,.gwp-live-feed-contents.notice-info,.gwp-live-feed-contents.notice-success,.gwp-live-feed-contents.notice-warning{display:flex;align-items:stretch;padding:0;border-radius:4px}.gwp-live-feed-contents.gwp-ad-gallery:before,.gwp-live-feed-contents.gwp-notice-recommended:before,.gwp-live-feed-contents.gwp-notice-required:before,.gwp-live-feed-contents.notice-error:before,.gwp-live-feed-contents.notice-info:before,.gwp-live-feed-contents.notice-success:before,.gwp-live-feed-contents.notice-warning:before{font-family:dashicons;font-size:20px;color:#fff;padding:10px;display:flex;align-items:center}.gwp-live-feed-contents.gwp-ad-gallery .feed-message-wrapper,.gwp-live-feed-contents.gwp-notice-recommended .feed-message-wrapper,.gwp-live-feed-contents.gwp-notice-required .feed-message-wrapper,.gwp-live-feed-contents.notice-error .feed-message-wrapper,.gwp-live-feed-contents.notice-info .feed-message-wrapper,.gwp-live-feed-contents.notice-success .feed-message-wrapper,.gwp-live-feed-contents.notice-warning .feed-message-wrapper{padding:10px 60px 10px 20px}.gwp-live-feed-contents.gwp-notice-discount{border-radius:5px;border:0;display:flex;align-items:center;padding:0;max-width:750px;margin-left:auto;margin-right:auto;background:#594679}.gwp-live-feed-contents.gwp-notice-discount .feed-thumbnail-wrapper .attachment-thumbnail{display:block}.gwp-live-feed-contents.gwp-notice-discount .feed-message-wrapper{display:flex;justify-content:space-between;align-items:center;width:100%;color:#fff;text-shadow:0 -1px 1px #594679;padding:20px 30px 20px 20px}.gwp-live-feed-contents.gwp-notice-discount .feed-message-wrapper p{font-size:14px;margin:0;padding:0}.gwp-live-feed-contents.gwp-notice-discount .feed-message-wrapper span.big{font-weight:400;font-size:18px}.gwp-live-feed-contents.gwp-notice-discount .feed-message-wrapper strong{font-weight:800}.gwp-live-feed-contents.gwp-notice-discount .feed-message-wrapper .button-primary{font-size:16px;border-radius:30px;padding:0 25px;border:0;height:40px;line-height:40px}.gwp-live-feed-contents.gwp-notice-discount .gwp-live-feed-close{color:#fff;opacity:.5;font-size:12px}.gwp-live-feed-contents.gwp-notice-discount .gwp-live-feed-close:hover{opacity:1}.gwp-live-feed-contents.gwp-notice-discount .gwp-live-feed-close:before{color:#fff}.gwp-live-feed-contents.gwp-notice-pro{border-radius:5px;border:0;display:flex;align-items:center;padding:0;max-width:750px;margin-left:auto;margin-right:auto;background:#2196f3}.gwp-live-feed-contents.gwp-notice-pro .feed-message-wrapper{display:flex;justify-content:space-between;align-items:center;width:100%;color:#fff;text-shadow:0 -1px 1px #2196f3;padding:20px}.gwp-live-feed-contents.gwp-notice-pro .feed-message-wrapper p{font-size:14px;margin:0;padding:0}.gwp-live-feed-contents.gwp-notice-pro .feed-message-wrapper span.big{font-weight:400;font-size:18px}.gwp-live-feed-contents.gwp-notice-pro .feed-message-wrapper strong{font-weight:800}.gwp-live-feed-contents.gwp-notice-pro .feed-message-wrapper .button-upgrade{position:relative;font-size:16px;color:#fff;font-weight:600;text-decoration:none;padding:25px 25px 25px 80px;display:block;margin:-20px;background:#673ab7;text-shadow:0 -1px 1px #673ab7}.gwp-live-feed-contents.gwp-notice-pro .feed-message-wrapper .button-upgrade small{font-weight:300;display:block}.gwp-live-feed-contents.gwp-notice-pro .feed-message-wrapper .button-upgrade i{position:absolute;left:25px;font-size:36px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);width:36px;height:36px}.gwp-live-feed-contents.gwp-notice-pro .feed-message-wrapper .button-upgrade:hover{background:#305af3;text-shadow:0 -1px 1px #305af3}.gwp-live-feed-contents.gwp-notice-pro .gwp-live-feed-close{color:#fff;opacity:.5;font-size:12px;z-index:1}.gwp-live-feed-contents.gwp-notice-pro .gwp-live-feed-close:hover{opacity:1}.gwp-live-feed-contents.gwp-notice-pro .gwp-live-feed-close:before{color:#fff}.gwp-live-feed-contents.gwp-notice-new{border:0;padding:0;max-width:750px;margin-left:auto;margin-right:auto;background:transparent;box-shadow:none}.gwp-live-feed-contents.gwp-notice-new .feed-message-wrapper,.gwp-live-feed-contents.gwp-notice-new .feed-message-wrapper img,.gwp-live-feed-contents.gwp-notice-new .feed-message-wrapper p{padding:0;margin:0}.gwp-live-feed-contents.gwp-notice-new .gwp-live-feed-close{color:rgba(0,0,0,.5);opacity:.5;font-size:12px}.gwp-live-feed-contents.gwp-notice-new .gwp-live-feed-close:hover{opacity:1}.gwp-live-feed-contents.gwp-notice-new .gwp-live-feed-close:before{color:rgba(0,0,0,.5)}.gwp-live-feed-contents .button-primary{background:#56bfd4;border-color:#3a9db1;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.3);text-shadow:0 -1px 1px #238ea5}.gwp-live-feed-contents .button-primary:active,.gwp-live-feed-contents .button-primary:focus,.gwp-live-feed-contents .button-primary:hover{background:#39b1ca;border-color:#3a9db1}.gwp-live-feed-contents .gwp-live-feed-close{display:flex;right:0;text-decoration:none;padding:10px 10px 10px 25px}.gwp-live-feed-contents .gwp-live-feed-close:before{display:inline-block}.gwp-live-feed-contents .gwp-live-feed-close-plain{display:flex;right:0;text-decoration:none;padding:15px}.gwp-live-feed-contents .gwp-live-feed-close-plain:before{display:inline-block}.wp-admin.rtl .gwp-live-feed-contents .gwp-live-feed-close-plain{left:0;right:auto}
assets/css/gwp-admin.css CHANGED
@@ -1,8 +1,8 @@
1
  /*!
2
- * Variation Swatches for WooCommerce v1.1.1
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
- * Date: 11/16/2020, 8:52:49 PM
6
  * Released under the GPLv3 license.
7
  */
8
  /**
@@ -123,6 +123,26 @@
123
  text-decoration: underline;
124
  }
125
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
126
  @media screen and (max-width: 782px) {
127
  .gwp-backbone-modal .gwp-backbone-modal-content {
128
  width: 100%;
1
  /*!
2
+ * Variation Swatches for WooCommerce v1.1.2
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
+ * Date: 11/26/2020, 7:20:28 PM
6
  * Released under the GPLv3 license.
7
  */
8
  /**
123
  text-decoration: underline;
124
  }
125
 
126
+ .woo-variation-gallery-message {
127
+ background-color: #7f54b3;
128
+ color: #fff;
129
+ padding: 5px 10px;
130
+ border-radius: 5px;
131
+ display: none;
132
+ }
133
+
134
+ .woo-variation-gallery-message a {
135
+ color: #fff;
136
+ }
137
+
138
+ .woo-variation-gallery-message.enable {
139
+ display: block;
140
+ }
141
+
142
+ .woo-variation-gallery-message.loading {
143
+ display: block;
144
+ }
145
+
146
  @media screen and (max-width: 782px) {
147
  .gwp-backbone-modal .gwp-backbone-modal-content {
148
  width: 100%;
assets/css/gwp-admin.min.css CHANGED
@@ -1,8 +1,8 @@
1
  /*!
2
- * Variation Swatches for WooCommerce v1.1.1
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
- * Date: 11/16/2020, 8:52:54 PM
6
  * Released under the GPLv3 license.
7
  */
8
- .gwp-backbone-modal *{box-sizing:border-box}.gwp-backbone-modal .gwp-backbone-modal-content{position:fixed;background:#fff;z-index:100000;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);max-width:100%;min-width:300px}.gwp-backbone-modal .gwp-backbone-modal-content article{overflow:auto}.gwp-backbone-modal .gwp-backbone-modal-content{width:40%}.gwp-backbone-modal .gwp-feedback-dialog-form-body h2{font-weight:700;font-size:15px;color:#495157;margin:0 0 20px}.gwp-backbone-modal .gwp-feedback-dialog-form-body .feedback-dialog-form-body .feedback-dialog-input-wrapper{line-height:1.3;overflow:hidden;margin-bottom:15px}.gwp-backbone-modal .gwp-feedback-dialog-form-body .feedback-dialog-form-body .feedback-dialog-input{float:left;margin:0 10px 0 0;box-shadow:none}.gwp-backbone-modal .gwp-feedback-dialog-form-body .feedback-dialog-form-body .feedback-text{margin:10px 0 0 25px;padding:5px;font-size:13px;box-shadow:none;background-color:#fff;width:92%;display:none}.gwp-backbone-modal .gwp-feedback-dialog-form-body .feedback-dialog-form-body .feedback-alert{color:#0273a9;background-color:#fff;font-weight:600}.gwp-backbone-modal .gwp-feedback-dialog-form-body .feedback-dialog-form-body .feedback-dialog-label{display:block;font-size:13px;color:#6d7882}.gwp-backbone-modal footer{margin-top:30px;overflow:hidden;clear:both}.gwp-backbone-modal footer .feedback-dialog-form-button-send{background-color:#56bfd4;border-radius:3px;color:#fff;line-height:1;padding:12px 20px;font-size:13px;height:40px;border:0;box-shadow:none;text-shadow:none;float:left}.gwp-backbone-modal footer .feedback-dialog-form-button-send:hover{background:#389db1}.gwp-backbone-modal footer .feedback-dialog-form-button-send:active{-webkit-transform:translateY(0);transform:translateY(0)}.gwp-backbone-modal footer .feedback-dialog-form-button-skip{font-size:12px;color:#a4afb7;background:none;float:right;width:auto;cursor:pointer;padding:10px 0;outline:0;text-decoration:none}.gwp-backbone-modal footer .feedback-dialog-form-button-skip:focus{box-shadow:none}.gwp-backbone-modal footer .feedback-dialog-form-button-skip:hover{text-decoration:underline}@media screen and (max-width:782px){.gwp-backbone-modal .gwp-backbone-modal-content{width:100%;height:100%;min-width:100%}}.gwp-backbone-modal-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;min-height:360px;background:#000;opacity:.7;z-index:99900}.gwp-backbone-modal-main{padding-bottom:55px}.gwp-backbone-modal-main article,.gwp-backbone-modal-main header{display:block;position:relative}.gwp-backbone-modal-main .gwp-backbone-modal-header{height:auto;background:#fcfcfc;padding:1em 1.5em;border-bottom:1px solid #ddd}.gwp-backbone-modal-main .gwp-backbone-modal-header h1{margin:0;color:#495157;font-weight:700;font-size:14px;background:transparent;line-height:2em;text-transform:uppercase;border:0}.gwp-backbone-modal-main .gwp-backbone-modal-header .modal-close-link{cursor:pointer;color:#777;height:54px;width:54px;padding:0;position:absolute;top:0;right:0;text-align:center;border:0;border-left:1px solid #ddd;background-color:transparent;transition:color .1s ease-in-out,background .1s ease-in-out}.gwp-backbone-modal-main .gwp-backbone-modal-header .modal-close-link:before{font:normal 22px/50px dashicons!important;color:#666;display:block;content:"\F335";font-weight:300}.gwp-backbone-modal-main .gwp-backbone-modal-header .modal-close-link:focus,.gwp-backbone-modal-main .gwp-backbone-modal-header .modal-close-link:hover{background:#ddd;border-color:#ccc;color:#000}.gwp-backbone-modal-main .gwp-backbone-modal-header .modal-close-link:focus{outline:none}.gwp-backbone-modal-main article{padding:1.5em}.gwp-backbone-modal-main article p{margin:1.5em 0}.gwp-backbone-modal-main article p:first-child{margin-top:0}.gwp-backbone-modal-main article p:last-child{margin-bottom:0}.gwp-backbone-modal-main article .pagination{padding:10px 0 0;text-align:center}.gwp-backbone-modal-main article table.widefat{margin:0;width:100%;border:0;box-shadow:none}.gwp-backbone-modal-main article table.widefat thead th{padding:0 1em 1em;text-align:left}.gwp-backbone-modal-main article table.widefat thead th:first-child{padding-left:0}.gwp-backbone-modal-main article table.widefat thead th:last-child{padding-right:0;text-align:right}.gwp-backbone-modal-main article table.widefat tbody td,.gwp-backbone-modal-main article table.widefat tbody th{padding:1em;text-align:left;vertical-align:middle}.gwp-backbone-modal-main article table.widefat tbody td:first-child,.gwp-backbone-modal-main article table.widefat tbody th:first-child{padding-left:0}.gwp-backbone-modal-main article table.widefat tbody td:last-child,.gwp-backbone-modal-main article table.widefat tbody th:last-child{padding-right:0;text-align:right}.gwp-backbone-modal-main article table.widefat tbody td .select2-container,.gwp-backbone-modal-main article table.widefat tbody td select,.gwp-backbone-modal-main article table.widefat tbody th .select2-container,.gwp-backbone-modal-main article table.widefat tbody th select{width:100%}.gwp-backbone-modal-main footer{position:absolute;left:0;right:0;bottom:0;z-index:100;padding:1em 1.5em;background:#fcfcfc;border-top:1px solid #dfdfdf;box-shadow:0 -4px 4px -4px rgba(0,0,0,.1)}.gwp-backbone-modal-main footer .inner{text-align:right;line-height:23px}.gwp-backbone-modal-main footer .inner .button{margin-bottom:0}.gwp-backbone-modal-main footer .inner .gwp-action-button-group{display:inline-block;float:left}.gwp-backbone-modal-main footer .inner .button.button-large{margin-left:10px;padding:0 10px!important;line-height:28px;height:auto;display:inline-block}.gwp-action-button-group{vertical-align:middle;line-height:26px;text-align:left}.gwp-action-button-group .gwp-action-button-group__items{display:inline-flex;flex-flow:row wrap;align-content:flex-start;justify-content:flex-start}.gwp-action-button-group .gwp-action-button{margin:0 0 0 -1px!important;border:1px solid #ccc;padding:0 10px!important;border-radius:0!important;float:none;line-height:28px;height:auto;z-index:1;position:relative;overflow:hidden;text-overflow:ellipsis;flex:1 0 auto;box-sizing:border-box;text-align:center;white-space:nowrap}.gwp-action-button-group .gwp-action-button:focus,.gwp-action-button-group .gwp-action-button:hover{border:1px solid #999;z-index:2}.gwp-action-button-group .gwp-action-button:first-child{margin-left:0!important;border-top-left-radius:3px!important;border-bottom-left-radius:3px!important}.gwp-action-button-group .gwp-action-button:last-child{border-top-right-radius:3px!important;border-bottom-right-radius:3px!important}.gwp-action-button-group .spinner{margin:10px}.gwp-action-button-group .spinner.visible{visibility:visible}
1
  /*!
2
+ * Variation Swatches for WooCommerce v1.1.2
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
+ * Date: 11/26/2020, 7:20:31 PM
6
  * Released under the GPLv3 license.
7
  */
8
+ .gwp-backbone-modal *{box-sizing:border-box}.gwp-backbone-modal .gwp-backbone-modal-content{position:fixed;background:#fff;z-index:100000;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);max-width:100%;min-width:300px}.gwp-backbone-modal .gwp-backbone-modal-content article{overflow:auto}.gwp-backbone-modal .gwp-backbone-modal-content{width:40%}.gwp-backbone-modal .gwp-feedback-dialog-form-body h2{font-weight:700;font-size:15px;color:#495157;margin:0 0 20px}.gwp-backbone-modal .gwp-feedback-dialog-form-body .feedback-dialog-form-body .feedback-dialog-input-wrapper{line-height:1.3;overflow:hidden;margin-bottom:15px}.gwp-backbone-modal .gwp-feedback-dialog-form-body .feedback-dialog-form-body .feedback-dialog-input{float:left;margin:0 10px 0 0;box-shadow:none}.gwp-backbone-modal .gwp-feedback-dialog-form-body .feedback-dialog-form-body .feedback-text{margin:10px 0 0 25px;padding:5px;font-size:13px;box-shadow:none;background-color:#fff;width:92%;display:none}.gwp-backbone-modal .gwp-feedback-dialog-form-body .feedback-dialog-form-body .feedback-alert{color:#0273a9;background-color:#fff;font-weight:600}.gwp-backbone-modal .gwp-feedback-dialog-form-body .feedback-dialog-form-body .feedback-dialog-label{display:block;font-size:13px;color:#6d7882}.gwp-backbone-modal footer{margin-top:30px;overflow:hidden;clear:both}.gwp-backbone-modal footer .feedback-dialog-form-button-send{background-color:#56bfd4;border-radius:3px;color:#fff;line-height:1;padding:12px 20px;font-size:13px;height:40px;border:0;box-shadow:none;text-shadow:none;float:left}.gwp-backbone-modal footer .feedback-dialog-form-button-send:hover{background:#389db1}.gwp-backbone-modal footer .feedback-dialog-form-button-send:active{-webkit-transform:translateY(0);transform:translateY(0)}.gwp-backbone-modal footer .feedback-dialog-form-button-skip{font-size:12px;color:#a4afb7;background:none;float:right;width:auto;cursor:pointer;padding:10px 0;outline:0;text-decoration:none}.gwp-backbone-modal footer .feedback-dialog-form-button-skip:focus{box-shadow:none}.gwp-backbone-modal footer .feedback-dialog-form-button-skip:hover{text-decoration:underline}.woo-variation-gallery-message{background-color:#7f54b3;color:#fff;padding:5px 10px;border-radius:5px;display:none}.woo-variation-gallery-message a{color:#fff}.woo-variation-gallery-message.enable,.woo-variation-gallery-message.loading{display:block}@media screen and (max-width:782px){.gwp-backbone-modal .gwp-backbone-modal-content{width:100%;height:100%;min-width:100%}}.gwp-backbone-modal-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;min-height:360px;background:#000;opacity:.7;z-index:99900}.gwp-backbone-modal-main{padding-bottom:55px}.gwp-backbone-modal-main article,.gwp-backbone-modal-main header{display:block;position:relative}.gwp-backbone-modal-main .gwp-backbone-modal-header{height:auto;background:#fcfcfc;padding:1em 1.5em;border-bottom:1px solid #ddd}.gwp-backbone-modal-main .gwp-backbone-modal-header h1{margin:0;color:#495157;font-weight:700;font-size:14px;background:transparent;line-height:2em;text-transform:uppercase;border:0}.gwp-backbone-modal-main .gwp-backbone-modal-header .modal-close-link{cursor:pointer;color:#777;height:54px;width:54px;padding:0;position:absolute;top:0;right:0;text-align:center;border:0;border-left:1px solid #ddd;background-color:transparent;transition:color .1s ease-in-out,background .1s ease-in-out}.gwp-backbone-modal-main .gwp-backbone-modal-header .modal-close-link:before{font:normal 22px/50px dashicons!important;color:#666;display:block;content:"\F335";font-weight:300}.gwp-backbone-modal-main .gwp-backbone-modal-header .modal-close-link:focus,.gwp-backbone-modal-main .gwp-backbone-modal-header .modal-close-link:hover{background:#ddd;border-color:#ccc;color:#000}.gwp-backbone-modal-main .gwp-backbone-modal-header .modal-close-link:focus{outline:none}.gwp-backbone-modal-main article{padding:1.5em}.gwp-backbone-modal-main article p{margin:1.5em 0}.gwp-backbone-modal-main article p:first-child{margin-top:0}.gwp-backbone-modal-main article p:last-child{margin-bottom:0}.gwp-backbone-modal-main article .pagination{padding:10px 0 0;text-align:center}.gwp-backbone-modal-main article table.widefat{margin:0;width:100%;border:0;box-shadow:none}.gwp-backbone-modal-main article table.widefat thead th{padding:0 1em 1em;text-align:left}.gwp-backbone-modal-main article table.widefat thead th:first-child{padding-left:0}.gwp-backbone-modal-main article table.widefat thead th:last-child{padding-right:0;text-align:right}.gwp-backbone-modal-main article table.widefat tbody td,.gwp-backbone-modal-main article table.widefat tbody th{padding:1em;text-align:left;vertical-align:middle}.gwp-backbone-modal-main article table.widefat tbody td:first-child,.gwp-backbone-modal-main article table.widefat tbody th:first-child{padding-left:0}.gwp-backbone-modal-main article table.widefat tbody td:last-child,.gwp-backbone-modal-main article table.widefat tbody th:last-child{padding-right:0;text-align:right}.gwp-backbone-modal-main article table.widefat tbody td .select2-container,.gwp-backbone-modal-main article table.widefat tbody td select,.gwp-backbone-modal-main article table.widefat tbody th .select2-container,.gwp-backbone-modal-main article table.widefat tbody th select{width:100%}.gwp-backbone-modal-main footer{position:absolute;left:0;right:0;bottom:0;z-index:100;padding:1em 1.5em;background:#fcfcfc;border-top:1px solid #dfdfdf;box-shadow:0 -4px 4px -4px rgba(0,0,0,.1)}.gwp-backbone-modal-main footer .inner{text-align:right;line-height:23px}.gwp-backbone-modal-main footer .inner .button{margin-bottom:0}.gwp-backbone-modal-main footer .inner .gwp-action-button-group{display:inline-block;float:left}.gwp-backbone-modal-main footer .inner .button.button-large{margin-left:10px;padding:0 10px!important;line-height:28px;height:auto;display:inline-block}.gwp-action-button-group{vertical-align:middle;line-height:26px;text-align:left}.gwp-action-button-group .gwp-action-button-group__items{display:inline-flex;flex-flow:row wrap;align-content:flex-start;justify-content:flex-start}.gwp-action-button-group .gwp-action-button{margin:0 0 0 -1px!important;border:1px solid #ccc;padding:0 10px!important;border-radius:0!important;float:none;line-height:28px;height:auto;z-index:1;position:relative;overflow:hidden;text-overflow:ellipsis;flex:1 0 auto;box-sizing:border-box;text-align:center;white-space:nowrap}.gwp-action-button-group .gwp-action-button:focus,.gwp-action-button-group .gwp-action-button:hover{border:1px solid #999;z-index:2}.gwp-action-button-group .gwp-action-button:first-child{margin-left:0!important;border-top-left-radius:3px!important;border-bottom-left-radius:3px!important}.gwp-action-button-group .gwp-action-button:last-child{border-top-right-radius:3px!important;border-bottom-right-radius:3px!important}.gwp-action-button-group .spinner{margin:10px}.gwp-action-button-group .spinner.visible{visibility:visible}
assets/css/wvs-theme-override.css CHANGED
@@ -1,8 +1,8 @@
1
  /*!
2
- * Variation Swatches for WooCommerce v1.1.1
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
- * Date: 11/16/2020, 8:52:49 PM
6
  * Released under the GPLv3 license.
7
  */
8
  .wvs-theme-sober .product form.cart .variations .variable,
1
  /*!
2
+ * Variation Swatches for WooCommerce v1.1.2
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
+ * Date: 11/26/2020, 7:20:28 PM
6
  * Released under the GPLv3 license.
7
  */
8
  .wvs-theme-sober .product form.cart .variations .variable,
assets/css/wvs-theme-override.min.css CHANGED
@@ -1,8 +1,8 @@
1
  /*!
2
- * Variation Swatches for WooCommerce v1.1.1
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
- * Date: 11/16/2020, 8:52:54 PM
6
  * Released under the GPLv3 license.
7
  */
8
  .wvs-theme-child-sober .product form.cart .variations .variable,.wvs-theme-sober .product form.cart .variations .variable{margin-bottom:15px!important}.wvs-theme-child-sober .product form.cart .variations .variable-options,.wvs-theme-sober .product form.cart .variations .variable-options{border:0!important}.wvs-theme-child-sober .product form.cart .variations .arrow,.wvs-theme-child-sober .product form.cart .variations .variable-options:after,.wvs-theme-sober .product form.cart .variations .arrow,.wvs-theme-sober .product form.cart .variations .variable-options:after{display:none}.wvs-theme-child-sober .product form.cart .variations .label,.wvs-theme-sober .product form.cart .variations .label{display:block;text-align:right;margin-right:10px}.wvs-theme-child-sober .product form.cart .variations .value,.wvs-theme-sober .product form.cart .variations .value{flex-grow:unset}.wvs-theme-child-sober .product form.cart .variations select,.wvs-theme-sober .product form.cart .variations select{border:1px solid #e4e6eb!important;padding:.5em 1em!important;text-align:left!important;-moz-text-align-last:left!important;text-align-last:left!important;-webkit-appearance:menulist-button!important}.wvs-theme-child-sober .product form.cart .radio-variable-item,.wvs-theme-sober .product form.cart .radio-variable-item{margin:5px;text-align:left}.wvs-theme-child-sober .product form.cart .radio-variable-item:last-child,.wvs-theme-sober .product form.cart .radio-variable-item:last-child{margin-right:0}.wvs-theme-child-sober .product form.cart .radio-variable-item label,.wvs-theme-sober .product form.cart .radio-variable-item label{padding-left:30px;margin:0}.wvs-theme-child-sober .product form.cart .radio-variable-item label:before,.wvs-theme-sober .product form.cart .radio-variable-item label:before{top:0;border-radius:100%}.wvs-theme-child-sober .product form.cart .radio-variable-item label:after,.wvs-theme-sober .product form.cart .radio-variable-item label:after{top:8px}.wvs-theme-shophistic-lite.woocommerce #main .entry-summary .variations{display:block!important}.wvs-theme-shophistic-lite .ql_custom_variations{display:none!important}.wvs-theme-shophistic-lite .radio-variable-item input[type=radio]{display:inline-block;margin:0}.wvs-theme-flatsome .variations .reset_variations{position:relative;bottom:0;left:0}.wvs-theme-child-storefront.single-product div.product,.wvs-theme-storefront.single-product div.product{overflow:visible!important}.wvs-theme-stockholm .variations .reset_variations{position:relative;bottom:0;left:0;-webkit-transform:none;transform:none}.wvs-theme-kalium-child .image-variable-item img,.wvs-theme-kalium .image-variable-item img{width:100%!important}.wvs-theme-kalium-child .radio-variable-item input,.wvs-theme-kalium .radio-variable-item input{width:16px!important;height:16px!important}.wvs-theme-kalium-child .woo-variation-items-wrapper .select-option-ui,.wvs-theme-kalium .woo-variation-items-wrapper .select-option-ui{display:none}.wvs-theme-aurum .variable-items-wrapper .image-variable-item>img,.wvs-theme-child-aurum .variable-items-wrapper .image-variable-item>img{width:100%}.wvs-theme-hestia .woo-variation-items-wrapper.value:before{display:none!important}.wvs-theme-child-thegem .woo-variation-items-wrapper .combobox-wrapper,.wvs-theme-thegem .woo-variation-items-wrapper .combobox-wrapper{display:none}.wvs-theme-child-thegem .wvs-archive-variation-wrapper .variations,.wvs-theme-thegem .wvs-archive-variation-wrapper .variations{padding:0}.wvs-theme-child-ushop .variations_form,.wvs-theme-ushop .variations_form{overflow:visible!important}.wvs-theme-child-ushop .single-product-summary .product_meta,.wvs-theme-ushop .single-product-summary .product_meta{display:inline-table}.wvs-theme-child-savoy .woo-variation-items-wrapper,.wvs-theme-savoy .woo-variation-items-wrapper{position:relative!important}.wvs-theme-child-savoy .woo-variation-items-wrapper .sod_select,.wvs-theme-savoy .woo-variation-items-wrapper .sod_select{display:none!important}.wvs-theme-child-savoy .nm-variation-row,.wvs-theme-savoy .nm-variation-row{display:flex}.wvs-theme-child-woodstock .woo-variation-items-wrapper .variation-select,.wvs-theme-woodstock .woo-variation-items-wrapper .variation-select{display:none!important}.wvs-theme-child-woodmart .woo-variation-items-wrapper>.swatches-select,.wvs-theme-woodmart .woo-variation-items-wrapper>.swatches-select{display:none}.wvs-theme-gecko-child .variations .value.woo-variation-items-wrapper,.wvs-theme-gecko .variations .value.woo-variation-items-wrapper{border:0!important}.wvs-theme-gecko-child .variations .value.woo-variation-items-wrapper:after,.wvs-theme-gecko .variations .value.woo-variation-items-wrapper:after{display:none!important}.woo-variation-gallery-theme-child-massive-dynamic .woo-variation-items-wrapper .clear-selection,.woo-variation-gallery-theme-massive-dynamic .woo-variation-items-wrapper .clear-selection{border:0;height:auto;width:auto}.woo-variation-gallery-theme-child-massive-dynamic .woo-variation-items-wrapper .clear-selection .reset_variations,.woo-variation-gallery-theme-massive-dynamic .woo-variation-items-wrapper .clear-selection .reset_variations{font-size:8px!important;width:20px;height:20px;padding:5px;box-sizing:border-box;border-radius:100%;border:1px solid #f04040;color:#f04040}.wvs-theme-child-claue .woo-variation-items-wrapper,.wvs-theme-claue .woo-variation-items-wrapper{border:none}.wvs-theme-child-claue .woo-variation-items-wrapper:after,.wvs-theme-claue .woo-variation-items-wrapper:after{display:none}.wvs-theme-child-jupiter table.variations,.wvs-theme-jupiter table.variations{overflow:initial}.wvs-theme-child-oxygen .woo-variation-items-wrapper .select-wrapper,.wvs-theme-oxygen .woo-variation-items-wrapper .select-wrapper{display:none}.wvs-theme-child-oxygen .variable-items-wrapper.radio-variable-wrapper .radio-variable-item input,.wvs-theme-oxygen .variable-items-wrapper.radio-variable-wrapper .radio-variable-item input{width:18px}.wvs-theme-child-simple-elegant .woo-variation-items-wrapper .wi-nice-select,.wvs-theme-simple-elegant .woo-variation-items-wrapper .wi-nice-select{display:none}.wvs-theme-child-twentytwenty table.variations,.wvs-theme-twentytwenty table.variations{overflow:auto}.woo-variation-swatches-theme-child-jevelin .sh-woo-layout table.variations td select.woo-variation-raw-select,.woo-variation-swatches-theme-jevelin .sh-woo-layout table.variations td select.woo-variation-raw-select,.wvs-theme-child-divi .et_pb_wc_add_to_cart form.variations_form.cart .variations td.value span:after,.wvs-theme-divi .et_pb_wc_add_to_cart form.variations_form.cart .variations td.value span:after{display:none!important}.woo-variation-swatches-theme-child-jevelin .sh-woo-layout table.variations,.woo-variation-swatches-theme-jevelin .sh-woo-layout table.variations{max-width:100%}.woo-variation-swatches-theme-child-jevelin .radio-variable-item label,.woo-variation-swatches-theme-jevelin .radio-variable-item label{line-height:1!important}.woo-variation-swatches-theme-child-stockie .woo-variation-raw-select+.select-styled,.woo-variation-swatches-theme-child .woo-variation-raw-select+.select-styled{display:none!important}
1
  /*!
2
+ * Variation Swatches for WooCommerce v1.1.2
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
+ * Date: 11/26/2020, 7:20:31 PM
6
  * Released under the GPLv3 license.
7
  */
8
  .wvs-theme-child-sober .product form.cart .variations .variable,.wvs-theme-sober .product form.cart .variations .variable{margin-bottom:15px!important}.wvs-theme-child-sober .product form.cart .variations .variable-options,.wvs-theme-sober .product form.cart .variations .variable-options{border:0!important}.wvs-theme-child-sober .product form.cart .variations .arrow,.wvs-theme-child-sober .product form.cart .variations .variable-options:after,.wvs-theme-sober .product form.cart .variations .arrow,.wvs-theme-sober .product form.cart .variations .variable-options:after{display:none}.wvs-theme-child-sober .product form.cart .variations .label,.wvs-theme-sober .product form.cart .variations .label{display:block;text-align:right;margin-right:10px}.wvs-theme-child-sober .product form.cart .variations .value,.wvs-theme-sober .product form.cart .variations .value{flex-grow:unset}.wvs-theme-child-sober .product form.cart .variations select,.wvs-theme-sober .product form.cart .variations select{border:1px solid #e4e6eb!important;padding:.5em 1em!important;text-align:left!important;-moz-text-align-last:left!important;text-align-last:left!important;-webkit-appearance:menulist-button!important}.wvs-theme-child-sober .product form.cart .radio-variable-item,.wvs-theme-sober .product form.cart .radio-variable-item{margin:5px;text-align:left}.wvs-theme-child-sober .product form.cart .radio-variable-item:last-child,.wvs-theme-sober .product form.cart .radio-variable-item:last-child{margin-right:0}.wvs-theme-child-sober .product form.cart .radio-variable-item label,.wvs-theme-sober .product form.cart .radio-variable-item label{padding-left:30px;margin:0}.wvs-theme-child-sober .product form.cart .radio-variable-item label:before,.wvs-theme-sober .product form.cart .radio-variable-item label:before{top:0;border-radius:100%}.wvs-theme-child-sober .product form.cart .radio-variable-item label:after,.wvs-theme-sober .product form.cart .radio-variable-item label:after{top:8px}.wvs-theme-shophistic-lite.woocommerce #main .entry-summary .variations{display:block!important}.wvs-theme-shophistic-lite .ql_custom_variations{display:none!important}.wvs-theme-shophistic-lite .radio-variable-item input[type=radio]{display:inline-block;margin:0}.wvs-theme-flatsome .variations .reset_variations{position:relative;bottom:0;left:0}.wvs-theme-child-storefront.single-product div.product,.wvs-theme-storefront.single-product div.product{overflow:visible!important}.wvs-theme-stockholm .variations .reset_variations{position:relative;bottom:0;left:0;-webkit-transform:none;transform:none}.wvs-theme-kalium-child .image-variable-item img,.wvs-theme-kalium .image-variable-item img{width:100%!important}.wvs-theme-kalium-child .radio-variable-item input,.wvs-theme-kalium .radio-variable-item input{width:16px!important;height:16px!important}.wvs-theme-kalium-child .woo-variation-items-wrapper .select-option-ui,.wvs-theme-kalium .woo-variation-items-wrapper .select-option-ui{display:none}.wvs-theme-aurum .variable-items-wrapper .image-variable-item>img,.wvs-theme-child-aurum .variable-items-wrapper .image-variable-item>img{width:100%}.wvs-theme-hestia .woo-variation-items-wrapper.value:before{display:none!important}.wvs-theme-child-thegem .woo-variation-items-wrapper .combobox-wrapper,.wvs-theme-thegem .woo-variation-items-wrapper .combobox-wrapper{display:none}.wvs-theme-child-thegem .wvs-archive-variation-wrapper .variations,.wvs-theme-thegem .wvs-archive-variation-wrapper .variations{padding:0}.wvs-theme-child-ushop .variations_form,.wvs-theme-ushop .variations_form{overflow:visible!important}.wvs-theme-child-ushop .single-product-summary .product_meta,.wvs-theme-ushop .single-product-summary .product_meta{display:inline-table}.wvs-theme-child-savoy .woo-variation-items-wrapper,.wvs-theme-savoy .woo-variation-items-wrapper{position:relative!important}.wvs-theme-child-savoy .woo-variation-items-wrapper .sod_select,.wvs-theme-savoy .woo-variation-items-wrapper .sod_select{display:none!important}.wvs-theme-child-savoy .nm-variation-row,.wvs-theme-savoy .nm-variation-row{display:flex}.wvs-theme-child-woodstock .woo-variation-items-wrapper .variation-select,.wvs-theme-woodstock .woo-variation-items-wrapper .variation-select{display:none!important}.wvs-theme-child-woodmart .woo-variation-items-wrapper>.swatches-select,.wvs-theme-woodmart .woo-variation-items-wrapper>.swatches-select{display:none}.wvs-theme-gecko-child .variations .value.woo-variation-items-wrapper,.wvs-theme-gecko .variations .value.woo-variation-items-wrapper{border:0!important}.wvs-theme-gecko-child .variations .value.woo-variation-items-wrapper:after,.wvs-theme-gecko .variations .value.woo-variation-items-wrapper:after{display:none!important}.woo-variation-gallery-theme-child-massive-dynamic .woo-variation-items-wrapper .clear-selection,.woo-variation-gallery-theme-massive-dynamic .woo-variation-items-wrapper .clear-selection{border:0;height:auto;width:auto}.woo-variation-gallery-theme-child-massive-dynamic .woo-variation-items-wrapper .clear-selection .reset_variations,.woo-variation-gallery-theme-massive-dynamic .woo-variation-items-wrapper .clear-selection .reset_variations{font-size:8px!important;width:20px;height:20px;padding:5px;box-sizing:border-box;border-radius:100%;border:1px solid #f04040;color:#f04040}.wvs-theme-child-claue .woo-variation-items-wrapper,.wvs-theme-claue .woo-variation-items-wrapper{border:none}.wvs-theme-child-claue .woo-variation-items-wrapper:after,.wvs-theme-claue .woo-variation-items-wrapper:after{display:none}.wvs-theme-child-jupiter table.variations,.wvs-theme-jupiter table.variations{overflow:initial}.wvs-theme-child-oxygen .woo-variation-items-wrapper .select-wrapper,.wvs-theme-oxygen .woo-variation-items-wrapper .select-wrapper{display:none}.wvs-theme-child-oxygen .variable-items-wrapper.radio-variable-wrapper .radio-variable-item input,.wvs-theme-oxygen .variable-items-wrapper.radio-variable-wrapper .radio-variable-item input{width:18px}.wvs-theme-child-simple-elegant .woo-variation-items-wrapper .wi-nice-select,.wvs-theme-simple-elegant .woo-variation-items-wrapper .wi-nice-select{display:none}.wvs-theme-child-twentytwenty table.variations,.wvs-theme-twentytwenty table.variations{overflow:auto}.woo-variation-swatches-theme-child-jevelin .sh-woo-layout table.variations td select.woo-variation-raw-select,.woo-variation-swatches-theme-jevelin .sh-woo-layout table.variations td select.woo-variation-raw-select,.wvs-theme-child-divi .et_pb_wc_add_to_cart form.variations_form.cart .variations td.value span:after,.wvs-theme-divi .et_pb_wc_add_to_cart form.variations_form.cart .variations td.value span:after{display:none!important}.woo-variation-swatches-theme-child-jevelin .sh-woo-layout table.variations,.woo-variation-swatches-theme-jevelin .sh-woo-layout table.variations{max-width:100%}.woo-variation-swatches-theme-child-jevelin .radio-variable-item label,.woo-variation-swatches-theme-jevelin .radio-variable-item label{line-height:1!important}.woo-variation-swatches-theme-child-stockie .woo-variation-raw-select+.select-styled,.woo-variation-swatches-theme-child .woo-variation-raw-select+.select-styled{display:none!important}
assets/js/admin.js CHANGED
@@ -1,8 +1,8 @@
1
  /*!
2
- * Variation Swatches for WooCommerce v1.1.1
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
- * Date: 11/16/2020, 8:52:49 PM
6
  * Released under the GPLv3 license.
7
  */
8
  /******/ (function(modules) { // webpackBootstrap
@@ -101,6 +101,14 @@ jQuery(function ($) {
101
  PluginHelper.ImageUploader();
102
  PluginHelper.AttributeDialog();
103
 
 
 
 
 
 
 
 
 
104
  $(document.body).on('woocommerce_added_attribute', function () {
105
  PluginHelper.SelectWoo();
106
  PluginHelper.ColorPicker();
@@ -146,6 +154,55 @@ var PluginHelper = function ($) {
146
  $().gwp_deactivate_popup('woo-variation-swatches');
147
  }
148
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
149
  }, {
150
  key: 'ImageUploader',
151
  value: function ImageUploader() {
@@ -278,7 +335,7 @@ var PluginHelper = function ($) {
278
  $('.product_attributes').block({
279
  message: null,
280
  overlayCSS: {
281
- background: '#fff',
282
  opacity: 0.6
283
  }
284
  });
1
  /*!
2
+ * Variation Swatches for WooCommerce v1.1.2
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
+ * Date: 11/26/2020, 7:20:28 PM
6
  * Released under the GPLv3 license.
7
  */
8
  /******/ (function(modules) { // webpackBootstrap
101
  PluginHelper.ImageUploader();
102
  PluginHelper.AttributeDialog();
103
 
104
+ $('#woocommerce-product-data').on('woocommerce_variations_loaded', function () {
105
+ PluginHelper.GalleryNotification();
106
+ });
107
+
108
+ $('#variable_product_options').on('woocommerce_variations_added', function () {
109
+ PluginHelper.GalleryNotification();
110
+ });
111
+
112
  $(document.body).on('woocommerce_added_attribute', function () {
113
  PluginHelper.SelectWoo();
114
  PluginHelper.ColorPicker();
154
  $().gwp_deactivate_popup('woo-variation-swatches');
155
  }
156
  }
157
+ }, {
158
+ key: 'GalleryNotification',
159
+ value: function GalleryNotification() {
160
+ $('.woocommerce_variation').each(function () {
161
+ var optionsWrapper = $(this).find('.options:first');
162
+ var galleryWrapper = $(this).find('.woo-variation-gallery-message');
163
+
164
+ galleryWrapper.insertBefore(optionsWrapper);
165
+ });
166
+
167
+ $('input.upload_image_id').on('change', function (event) {
168
+ var value = $.trim($(this).val());
169
+
170
+ if (value) {
171
+ $(this).closest('.data').find('.woo-variation-gallery-message').addClass('enable');
172
+ } else {
173
+ $(this).closest('.data').find('.woo-variation-gallery-message').removeClass('enable');
174
+ }
175
+ });
176
+
177
+ $('a.install-woo-variation-gallery-action').on('click', function (event) {
178
+ event.preventDefault();
179
+
180
+ var $parent = $(this).parent();
181
+
182
+ var installing = $parent.data('installing');
183
+ var activated = $parent.data('activated');
184
+ var nonce = $parent.data('nonce');
185
+
186
+ $parent.text(installing);
187
+ wp.ajax.send('install_woo_variation_gallery', {
188
+ data: {
189
+ 'nonce': nonce
190
+ },
191
+ success: function success(response) {
192
+ $parent.text(activated);
193
+ _.delay(function () {
194
+ $('.woocommerce_variable_attributes .woo-variation-gallery-message').remove();
195
+ }, 5000);
196
+ },
197
+ error: function error(response) {
198
+ $parent.text(activated);
199
+ _.delay(function () {
200
+ $('.woocommerce_variable_attributes .woo-variation-gallery-message').remove();
201
+ }, 5000);
202
+ }
203
+ });
204
+ });
205
+ }
206
  }, {
207
  key: 'ImageUploader',
208
  value: function ImageUploader() {
335
  $('.product_attributes').block({
336
  message: null,
337
  overlayCSS: {
338
+ background: '#FFFFFF',
339
  opacity: 0.6
340
  }
341
  });
assets/js/admin.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){var t={};function o(i){if(t[i])return t[i].exports;var n=t[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=t,o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=0)}([function(e,t,o){o(1),o(3),o(4),o(5),o(6),o(7),e.exports=o(8)},function(e,t,o){jQuery(function(e){Promise.resolve().then(function(){return o(2)}).then(function(t){var o=t.PluginHelper;o.GWPAdmin(),o.SelectWoo(),o.ColorPicker(),o.FieldDependency(),o.ImageUploader(),o.AttributeDialog(),e(document.body).on("woocommerce_added_attribute",function(){o.SelectWoo(),o.ColorPicker(),o.ImageUploader(),o.AttributeDialog()}),e(document.body).on("wvs_pro_product_swatches_variation_loaded",function(){o.ColorPicker(),o.ImageUploader()})})})},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),o.d(t,"PluginHelper",function(){return r});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i])}return e},n=function(){function e(e,t){for(var o=0;o<t.length;o++){var i=t[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,o,i){return o&&e(t.prototype,o),i&&e(t,i),t}}();var a,r=(a=jQuery,function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return n(e,null,[{key:"GWPAdmin",value:function(){a().gwp_live_feed&&a().gwp_live_feed(),a().gwp_deactivate_popup&&a().gwp_deactivate_popup("woo-variation-swatches")}},{key:"ImageUploader",value:function(){a(document).off("click","button.wvs_upload_image_button"),a(document).on("click","button.wvs_upload_image_button",this.AddImage),a(document).on("click","button.wvs_remove_image_button",this.RemoveImage)}},{key:"AddImage",value:function(e){var t=this;e.preventDefault(),e.stopPropagation();var o=void 0;if("undefined"!=typeof wp&&wp.media&&wp.media.editor){if(o)return void o.open();(o=wp.media.frames.select_image=wp.media({title:WVSPluginObject.media_title,button:{text:WVSPluginObject.button_title},multiple:!1})).on("select",function(){var e=o.state().get("selection").first().toJSON();if(""!==a.trim(e.id)){var i=void 0===e.sizes.thumbnail?e.sizes.full.url:e.sizes.thumbnail.url;a(t).prev().val(e.id),a(t).closest(".meta-image-field-wrapper").find("img").attr("src",i),a(t).next().show()}}),o.on("open",function(){var e=o.state().get("selection"),i=a(t).prev().val(),n=wp.media.attachment(i);n.fetch(),e.add(n?[n]:[])}),o.open()}}},{key:"RemoveImage",value:function(e){e.preventDefault(),e.stopPropagation();var t=a(this).closest(".meta-image-field-wrapper").find("img").data("placeholder");return a(this).closest(".meta-image-field-wrapper").find("img").attr("src",t),a(this).prev().prev().val(""),a(this).hide(),!1}},{key:"SelectWoo",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"select.wvs-selectwoo";a().selectWoo&&a(e).selectWoo({allowClear:!0})}},{key:"ColorPicker",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"input.wvs-color-picker";a().wpColorPicker&&a(e).wpColorPicker()}},{key:"FieldDependency",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"[data-wvsdepends]";a().FormFieldDependency&&a(e).FormFieldDependency()}},{key:"savingDialog",value:function(e,t,o){var n={},r="";if(t.find("input, select").each(function(){var e=a(this).attr("name"),t=a(this).val();e&&("tag_name"===e?r=t:n[e]=t,a(this).val(""))}),r){a(".product_attributes").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var l=i({action:"woocommerce_add_new_attribute",taxonomy:o,term:r,security:woocommerce_admin_meta_boxes.add_attribute_nonce},n);a.post(woocommerce_admin_meta_boxes.ajax_url,l,function(t){t.error?window.alert(t.error):t.slug&&(e.find("select.attribute_values").append('<option value="'+t.term_id+'" selected="selected">'+t.name+"</option>"),e.find("select.attribute_values").change()),a(".product_attributes").unblock()})}else a(".product_attributes").unblock()}},{key:"AttributeDialog",value:function(){var e=this;a(".product_attributes").on("click","button.wvs_add_new_attribute",function(t){t.preventDefault();var o=a(this).closest(".woocommerce_attribute"),i=o.data("taxonomy"),n=a(this).data("dialog_title");a(".wvs-attribute-dialog-for-"+i).dialog({title:"",dialogClass:"wp-dialog wvs-attribute-dialog",classes:{"ui-dialog":"wp-dialog wvs-attribute-dialog"},autoOpen:!1,draggable:!0,width:"auto",modal:!0,resizable:!1,closeOnEscape:!0,position:{my:"center",at:"center",of:window},open:function(){a(".ui-widget-overlay").bind("click",function(){a("#attribute-dialog").dialog("close")})},create:function(){}}).dialog("option","title",n).dialog("option","buttons",[{text:WVSPluginObject.dialog_save,click:function(){e.savingDialog(o,a(this),i),a(this).dialog("close").dialog("destroy")}},{text:WVSPluginObject.dialog_cancel,click:function(){a(this).dialog("close").dialog("destroy")}}]).dialog("open")})}}]),e}())},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){}]);
1
+ !function(e){var t={};function o(i){if(t[i])return t[i].exports;var a=t[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,o),a.l=!0,a.exports}o.m=e,o.c=t,o.d=function(e,t,i){o.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=0)}([function(e,t,o){o(1),o(3),o(4),o(5),o(6),o(7),e.exports=o(8)},function(e,t,o){jQuery(function(e){Promise.resolve().then(function(){return o(2)}).then(function(t){var o=t.PluginHelper;o.GWPAdmin(),o.SelectWoo(),o.ColorPicker(),o.FieldDependency(),o.ImageUploader(),o.AttributeDialog(),e("#woocommerce-product-data").on("woocommerce_variations_loaded",function(){o.GalleryNotification()}),e("#variable_product_options").on("woocommerce_variations_added",function(){o.GalleryNotification()}),e(document.body).on("woocommerce_added_attribute",function(){o.SelectWoo(),o.ColorPicker(),o.ImageUploader(),o.AttributeDialog()}),e(document.body).on("wvs_pro_product_swatches_variation_loaded",function(){o.ColorPicker(),o.ImageUploader()})})})},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),o.d(t,"PluginHelper",function(){return r});var i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i])}return e},a=function(){function e(e,t){for(var o=0;o<t.length;o++){var i=t[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,o,i){return o&&e(t.prototype,o),i&&e(t,i),t}}();var n,r=(n=jQuery,function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return a(e,null,[{key:"GWPAdmin",value:function(){n().gwp_live_feed&&n().gwp_live_feed(),n().gwp_deactivate_popup&&n().gwp_deactivate_popup("woo-variation-swatches")}},{key:"GalleryNotification",value:function(){n(".woocommerce_variation").each(function(){var e=n(this).find(".options:first");n(this).find(".woo-variation-gallery-message").insertBefore(e)}),n("input.upload_image_id").on("change",function(e){n.trim(n(this).val())?n(this).closest(".data").find(".woo-variation-gallery-message").addClass("enable"):n(this).closest(".data").find(".woo-variation-gallery-message").removeClass("enable")}),n("a.install-woo-variation-gallery-action").on("click",function(e){e.preventDefault();var t=n(this).parent(),o=t.data("installing"),i=t.data("activated"),a=t.data("nonce");t.text(o),wp.ajax.send("install_woo_variation_gallery",{data:{nonce:a},success:function(e){t.text(i),_.delay(function(){n(".woocommerce_variable_attributes .woo-variation-gallery-message").remove()},5e3)},error:function(e){t.text(i),_.delay(function(){n(".woocommerce_variable_attributes .woo-variation-gallery-message").remove()},5e3)}})})}},{key:"ImageUploader",value:function(){n(document).off("click","button.wvs_upload_image_button"),n(document).on("click","button.wvs_upload_image_button",this.AddImage),n(document).on("click","button.wvs_remove_image_button",this.RemoveImage)}},{key:"AddImage",value:function(e){var t=this;e.preventDefault(),e.stopPropagation();var o=void 0;if("undefined"!=typeof wp&&wp.media&&wp.media.editor){if(o)return void o.open();(o=wp.media.frames.select_image=wp.media({title:WVSPluginObject.media_title,button:{text:WVSPluginObject.button_title},multiple:!1})).on("select",function(){var e=o.state().get("selection").first().toJSON();if(""!==n.trim(e.id)){var i=void 0===e.sizes.thumbnail?e.sizes.full.url:e.sizes.thumbnail.url;n(t).prev().val(e.id),n(t).closest(".meta-image-field-wrapper").find("img").attr("src",i),n(t).next().show()}}),o.on("open",function(){var e=o.state().get("selection"),i=n(t).prev().val(),a=wp.media.attachment(i);a.fetch(),e.add(a?[a]:[])}),o.open()}}},{key:"RemoveImage",value:function(e){e.preventDefault(),e.stopPropagation();var t=n(this).closest(".meta-image-field-wrapper").find("img").data("placeholder");return n(this).closest(".meta-image-field-wrapper").find("img").attr("src",t),n(this).prev().prev().val(""),n(this).hide(),!1}},{key:"SelectWoo",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"select.wvs-selectwoo";n().selectWoo&&n(e).selectWoo({allowClear:!0})}},{key:"ColorPicker",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"input.wvs-color-picker";n().wpColorPicker&&n(e).wpColorPicker()}},{key:"FieldDependency",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"[data-wvsdepends]";n().FormFieldDependency&&n(e).FormFieldDependency()}},{key:"savingDialog",value:function(e,t,o){var a={},r="";if(t.find("input, select").each(function(){var e=n(this).attr("name"),t=n(this).val();e&&("tag_name"===e?r=t:a[e]=t,n(this).val(""))}),r){n(".product_attributes").block({message:null,overlayCSS:{background:"#FFFFFF",opacity:.6}});var l=i({action:"woocommerce_add_new_attribute",taxonomy:o,term:r,security:woocommerce_admin_meta_boxes.add_attribute_nonce},a);n.post(woocommerce_admin_meta_boxes.ajax_url,l,function(t){t.error?window.alert(t.error):t.slug&&(e.find("select.attribute_values").append('<option value="'+t.term_id+'" selected="selected">'+t.name+"</option>"),e.find("select.attribute_values").change()),n(".product_attributes").unblock()})}else n(".product_attributes").unblock()}},{key:"AttributeDialog",value:function(){var e=this;n(".product_attributes").on("click","button.wvs_add_new_attribute",function(t){t.preventDefault();var o=n(this).closest(".woocommerce_attribute"),i=o.data("taxonomy"),a=n(this).data("dialog_title");n(".wvs-attribute-dialog-for-"+i).dialog({title:"",dialogClass:"wp-dialog wvs-attribute-dialog",classes:{"ui-dialog":"wp-dialog wvs-attribute-dialog"},autoOpen:!1,draggable:!0,width:"auto",modal:!0,resizable:!1,closeOnEscape:!0,position:{my:"center",at:"center",of:window},open:function(){n(".ui-widget-overlay").bind("click",function(){n("#attribute-dialog").dialog("close")})},create:function(){}}).dialog("option","title",a).dialog("option","buttons",[{text:WVSPluginObject.dialog_save,click:function(){e.savingDialog(o,n(this),i),n(this).dialog("close").dialog("destroy")}},{text:WVSPluginObject.dialog_cancel,click:function(){n(this).dialog("close").dialog("destroy")}}]).dialog("open")})}}]),e}())},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){}]);
assets/js/frontend.js CHANGED
@@ -1,8 +1,8 @@
1
  /*!
2
- * Variation Swatches for WooCommerce v1.1.1
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
- * Date: 11/16/2020, 8:52:49 PM
6
  * Released under the GPLv3 license.
7
  */
8
  /******/ (function(modules) { // webpackBootstrap
@@ -469,7 +469,8 @@ var WooVariationSwatches = function ($) {
469
 
470
  this._element.on('woocommerce_variation_has_changed.wvs', function (event) {
471
 
472
- event.stopPropagation();
 
473
 
474
  $(this).find('ul.variable-items-wrapper').each(function (index, el) {
475
 
1
  /*!
2
+ * Variation Swatches for WooCommerce v1.1.2
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
+ * Date: 11/26/2020, 7:20:28 PM
6
  * Released under the GPLv3 license.
7
  */
8
  /******/ (function(modules) { // webpackBootstrap
469
 
470
  this._element.on('woocommerce_variation_has_changed.wvs', function (event) {
471
 
472
+ // Don't use any propagation. It will disable composit product functionality
473
+ // event.stopPropagation();
474
 
475
  $(this).find('ul.variable-items-wrapper').each(function (index, el) {
476
 
assets/js/frontend.min.js CHANGED
@@ -1 +1 @@
1
- !function(t){var i={};function e(a){if(i[a])return i[a].exports;var o=i[a]={i:a,l:!1,exports:{}};return t[a].call(o.exports,o,o.exports,e),o.l=!0,o.exports}e.m=t,e.c=i,e.d=function(t,i,a){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:a})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},e.p="",e(e.s=9)}({10:function(t,i,e){jQuery(function(t){Promise.resolve().then(function(){return e(11)}).then(function(){t(document).on("wc_variation_form.wvs",".variations_form:not(.wvs-loaded)",function(i){t(this).WooVariationSwatches()}),t(document.body).on("post-load.wvs",function(){t(".variations_form").each(function(){t(this).wc_variation_form()})}),t(document).on("yith_infs_added_elem.wvs",function(){t(".variations_form").each(function(){t(this).wc_variation_form()})}),t(document).on("yith-wcan-ajax-filtered.wvs",function(){t(".variations_form").each(function(){t(this).wc_variation_form()})}),t(document).on("wood-images-loaded.wvs",function(){t(".variations_form").each(function(){t(this).wc_variation_form()})}),t(document).on("berocket_ajax_products_loaded.wvs",function(){t(".variations_form").each(function(){t(this).wc_variation_form()})}),t(".shop-container .products").on("append.infiniteScroll",function(i,e,a){t(".variations_form").each(function(){t(this).wc_variation_form()})}),t(document).on("facetwp-loaded.wvs",function(){t(".variations_form").each(function(){t(this).wc_variation_form()})}),t("body").on("aln_reloaded.wvs",function(){_.delay(function(){t(".variations_form").each(function(){t(this).wc_variation_form()})},100)})})})},11:function(t,i,e){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var a=function(){function t(t,i){for(var e=0;e<i.length;e++){var a=i[e];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(i,e,a){return e&&t(i.prototype,e),a&&t(i,a),i}}();var o=function(t){var i={},e=function(){function e(a,o){!function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}(this,e),this._element=t(a),this._config=t.extend({},i,o),this._generated={},this._out_of_stock={},this._disabled={},this.product_variations=this._element.data("product_variations")||[],this.is_ajax_variation=this.product_variations.length<1,this.product_id=this._element.data("product_id"),this.reset_variations=this._element.find(".reset_variations"),this.is_mobile=t("body").hasClass("woo-variation-swatches-on-mobile"),this.selected_item_template='<span class="woo-selected-variation-item-name" data-default=""></span>',this._element.addClass("wvs-loaded"),this.init(),this.update(),t(document).trigger("woo_variation_swatches",[this._element])}return a(e,[{key:"init",value:function(){var i=this,e=this;this._generated=this.product_variations.reduce(function(t,i){return Object.keys(i.attributes).map(function(e){t[e]||(t[e]=[]),i.attributes[e]&&t[e].push(i.attributes[e])}),t},{}),this._out_of_stock=this.product_variations.reduce(function(t,i){return Object.keys(i.attributes).map(function(e){t[e]||(t[e]=[]),i.attributes[e]&&!i.is_in_stock&&t[e].push(i.attributes[e])}),t},{}),woo_variation_swatches_options.show_variation_label&&this._element.find(".variations .label").each(function(e,a){t(a).append(i.selected_item_template)}),this._element.find("ul.variable-items-wrapper").each(function(i,a){t(this).parent().addClass("woo-variation-items-wrapper");var o=t(this).siblings("select.woo-variation-raw-select"),s="",n=t(this).siblings("select.woo-variation-raw-select").find("option"),r=t(this).siblings("select.woo-variation-raw-select").find("option:disabled"),c=t(this).siblings("select.woo-variation-raw-select").find("option:selected"),l=t(this).siblings("select.woo-variation-raw-select").find("option").eq(1),d=t(this).find("li:not(.woo-variation-swatches-variable-item-more)"),h=t(this).hasClass("reselect-clear"),v=t(this).data("attribute_name"),u=(e.is_ajax_variation||e._generated[v],e.is_ajax_variation||e._out_of_stock[v],[]),f=[],w=t(this).parent().prev().find(".woo-selected-variation-item-name");n.length<1&&(o=t(this).parent().find("select.woo-variation-raw-select"),n=t(this).parent().find("select.woo-variation-raw-select").find("option"),r=t(this).parent().find("select.woo-variation-raw-select").find("option:disabled"),c=t(this).parent().find("select.woo-variation-raw-select").find("option:selected"),l=t(this).parent().find("select.woo-variation-raw-select").find("option").eq(1)),n.each(function(){""!==t(this).val()&&(u.push(t(this).val()),s=c?c.val():l.val())}),r.each(function(){""!==t(this).val()&&f.push(t(this).val())});var p=_.difference(u,f);d.each(function(i,e){var a=t(this).attr("data-value"),o=t(this).attr("data-title");t(this).removeClass("selected disabled").addClass("disabled"),t(this).attr("aria-checked","false"),t(this).attr("tabindex","-1"),t(this).hasClass("radio-variable-item")&&t(this).find("input.wvs-radio-variable-item:radio").prop("disabled",!0).prop("checked",!1),_.contains(p,a)&&(t(this).removeClass("selected disabled"),t(this).removeAttr("aria-hidden"),t(this).attr("tabindex","0"),t(this).find("input.wvs-radio-variable-item:radio").prop("disabled",!1),a===s&&(t(this).addClass("selected"),t(this).attr("aria-checked","true"),woo_variation_swatches_options.show_variation_label&&w.text(": "+o),t(this).hasClass("radio-variable-item")&&t(this).find("input.wvs-radio-variable-item:radio").prop("checked",!0)))}),h?(t(this).on("click.wvs","li:not(.selected):not(.radio-variable-item):not(.woo-variation-swatches-variable-item-more)",function(i){i.preventDefault(),i.stopPropagation();var a=t(this).data("value");o.val(a).trigger("change"),o.trigger("click"),o.trigger("focusin"),e.is_mobile&&o.trigger("touchstart"),t(this).trigger("focus"),t(this).trigger("wvs-selected-item",[a,o,e._element])}),t(this).on("click.wvs","li.selected:not(.radio-variable-item):not(.woo-variation-swatches-variable-item-more)",function(i){i.preventDefault(),i.stopPropagation();var a=t(this).val();o.val("").trigger("change"),o.trigger("click"),o.trigger("focusin"),e.is_mobile&&o.trigger("touchstart"),t(this).trigger("focus"),t(this).trigger("wvs-unselected-item",[a,o,e._element])}),t(this).on("click.wvs","input.wvs-radio-variable-item:radio",function(i){i.stopPropagation(),t(this).trigger("change.wvs",{radioChange:!0})}),t(this).on("change.wvs","input.wvs-radio-variable-item:radio",function(i,a){if(i.preventDefault(),i.stopPropagation(),a&&a.radioChange){var s=t(this).val();t(this).parent("li.radio-variable-item").hasClass("selected")?(o.val("").trigger("change"),t(this).parent("li.radio-variable-item").trigger("wvs-unselected-item",[s,o,e._element])):(o.val(s).trigger("change"),t(this).parent("li.radio-variable-item").trigger("wvs-selected-item",[s,o,e._element])),o.trigger("click"),o.trigger("focusin"),e.is_mobile&&o.trigger("touchstart")}})):(t(this).on("click.wvs","li:not(.radio-variable-item):not(.woo-variation-swatches-variable-item-more)",function(i){i.preventDefault(),i.stopPropagation();var a=t(this).data("value");o.val(a).trigger("change"),o.trigger("click"),o.trigger("focusin"),e.is_mobile&&o.trigger("touchstart"),t(this).trigger("focus"),t(this).trigger("wvs-selected-item",[a,o,e._element])}),t(this).on("change.wvs","input.wvs-radio-variable-item:radio",function(i){i.preventDefault(),i.stopPropagation();var a=t(this).val();o.val(a).trigger("change"),o.trigger("click"),o.trigger("focusin"),e.is_mobile&&o.trigger("touchstart"),t(this).parent("li.radio-variable-item").removeClass("selected disabled").addClass("selected"),t(this).parent("li.radio-variable-item").trigger("wvs-selected-item",[a,o,e._element])})),t(this).on("keydown.wvs","li:not(.disabled):not(.woo-variation-swatches-variable-item-more)",function(i){(i.keyCode&&32===i.keyCode||i.key&&" "===i.key||i.keyCode&&13===i.keyCode||i.key&&"enter"===i.key.toLowerCase())&&(i.preventDefault(),t(this).trigger("click.wvs"))})}),this._element.trigger("woo_variation_swatches_init",[this,this.product_variations]),t(document).trigger("woo_variation_swatches_loaded",[this._element,this.product_variations])}},{key:"update",value:function(){var i=this;this._element.on("woocommerce_variation_has_changed.wvs",function(e){e.stopPropagation(),t(this).find("ul.variable-items-wrapper").each(function(e,a){t(this).siblings("select.woo-variation-raw-select");var o="",s=t(this).siblings("select.woo-variation-raw-select").find("option"),n=t(this).siblings("select.woo-variation-raw-select").find("option:disabled"),r=t(this).siblings("select.woo-variation-raw-select").find("option:selected"),c=t(this).siblings("select.woo-variation-raw-select").find("option").eq(1),l=t(this).find("li:not(.woo-variation-swatches-variable-item-more)"),d=t(this).data("attribute_name"),h=(i.is_ajax_variation||i._generated[d],i.is_ajax_variation||i._out_of_stock[d],[]),v=[],u=t(this).parent().prev().find(".woo-selected-variation-item-name");s.length<1&&(t(this).parent().find("select.woo-variation-raw-select"),s=t(this).parent().find("select.woo-variation-raw-select").find("option"),n=t(this).parent().find("select.woo-variation-raw-select").find("option:disabled"),r=t(this).parent().find("select.woo-variation-raw-select").find("option:selected"),c=t(this).parent().find("select.woo-variation-raw-select").find("option").eq(1)),s.each(function(){""!==t(this).val()&&(h.push(t(this).val()),o=r?r.val():c.val())}),n.each(function(){""!==t(this).val()&&v.push(t(this).val())});var f=_.difference(h,v);i.is_ajax_variation?l.each(function(e,a){var s=t(this).attr("data-value"),n=t(this).attr("data-title");t(this).removeClass("selected disabled"),t(this).attr("aria-checked","false"),o.length<1&&woo_variation_swatches_options.show_variation_label&&u.text(""),s===o&&(t(this).addClass("selected"),t(this).attr("aria-checked","true"),woo_variation_swatches_options.show_variation_label&&u.text(": "+n),t(this).hasClass("radio-variable-item")&&t(this).find("input.wvs-radio-variable-item:radio").prop("disabled",!1).prop("checked",!0)),t(this).trigger("wvs-item-updated",[o,s,i])}):l.each(function(e,a){var s=t(this).attr("data-value"),n=t(this).attr("data-title");t(this).removeClass("selected disabled").addClass("disabled"),t(this).attr("aria-checked","false"),t(this).attr("tabindex","-1"),t(this).hasClass("radio-variable-item")&&t(this).find("input.wvs-radio-variable-item:radio").prop("disabled",!0).prop("checked",!1),_.contains(f,s)&&(t(this).removeClass("selected disabled"),t(this).removeAttr("aria-hidden"),t(this).attr("tabindex","0"),t(this).find("input.wvs-radio-variable-item:radio").prop("disabled",!1),o.length<1&&woo_variation_swatches_options.show_variation_label&&u.text(""),s===o&&(t(this).addClass("selected"),t(this).attr("aria-checked","true"),woo_variation_swatches_options.show_variation_label&&u.text(": "+n),t(this).hasClass("radio-variable-item")&&t(this).find("input.wvs-radio-variable-item:radio").prop("checked",!0))),t(this).trigger("wvs-item-updated",[o,s,i])}),t(this).trigger("wvs-items-updated")})})}}],[{key:"_jQueryInterface",value:function(t){return this.each(function(){new e(this,t)})}}]),e}();return t.fn.WooVariationSwatches=e._jQueryInterface,t.fn.WooVariationSwatches.Constructor=e,t.fn.WooVariationSwatches.noConflict=function(){return t.fn.WooVariationSwatches=t.fn.WooVariationSwatches,e._jQueryInterface},e}(jQuery);i.default=o},9:function(t,i,e){t.exports=e(10)}});
1
+ !function(t){var i={};function e(a){if(i[a])return i[a].exports;var o=i[a]={i:a,l:!1,exports:{}};return t[a].call(o.exports,o,o.exports,e),o.l=!0,o.exports}e.m=t,e.c=i,e.d=function(t,i,a){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:a})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},e.p="",e(e.s=9)}({10:function(t,i,e){jQuery(function(t){Promise.resolve().then(function(){return e(11)}).then(function(){t(document).on("wc_variation_form.wvs",".variations_form:not(.wvs-loaded)",function(i){t(this).WooVariationSwatches()}),t(document.body).on("post-load.wvs",function(){t(".variations_form").each(function(){t(this).wc_variation_form()})}),t(document).on("yith_infs_added_elem.wvs",function(){t(".variations_form").each(function(){t(this).wc_variation_form()})}),t(document).on("yith-wcan-ajax-filtered.wvs",function(){t(".variations_form").each(function(){t(this).wc_variation_form()})}),t(document).on("wood-images-loaded.wvs",function(){t(".variations_form").each(function(){t(this).wc_variation_form()})}),t(document).on("berocket_ajax_products_loaded.wvs",function(){t(".variations_form").each(function(){t(this).wc_variation_form()})}),t(".shop-container .products").on("append.infiniteScroll",function(i,e,a){t(".variations_form").each(function(){t(this).wc_variation_form()})}),t(document).on("facetwp-loaded.wvs",function(){t(".variations_form").each(function(){t(this).wc_variation_form()})}),t("body").on("aln_reloaded.wvs",function(){_.delay(function(){t(".variations_form").each(function(){t(this).wc_variation_form()})},100)})})})},11:function(t,i,e){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var a=function(){function t(t,i){for(var e=0;e<i.length;e++){var a=i[e];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(i,e,a){return e&&t(i.prototype,e),a&&t(i,a),i}}();var o=function(t){var i={},e=function(){function e(a,o){!function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")}(this,e),this._element=t(a),this._config=t.extend({},i,o),this._generated={},this._out_of_stock={},this._disabled={},this.product_variations=this._element.data("product_variations")||[],this.is_ajax_variation=this.product_variations.length<1,this.product_id=this._element.data("product_id"),this.reset_variations=this._element.find(".reset_variations"),this.is_mobile=t("body").hasClass("woo-variation-swatches-on-mobile"),this.selected_item_template='<span class="woo-selected-variation-item-name" data-default=""></span>',this._element.addClass("wvs-loaded"),this.init(),this.update(),t(document).trigger("woo_variation_swatches",[this._element])}return a(e,[{key:"init",value:function(){var i=this,e=this;this._generated=this.product_variations.reduce(function(t,i){return Object.keys(i.attributes).map(function(e){t[e]||(t[e]=[]),i.attributes[e]&&t[e].push(i.attributes[e])}),t},{}),this._out_of_stock=this.product_variations.reduce(function(t,i){return Object.keys(i.attributes).map(function(e){t[e]||(t[e]=[]),i.attributes[e]&&!i.is_in_stock&&t[e].push(i.attributes[e])}),t},{}),woo_variation_swatches_options.show_variation_label&&this._element.find(".variations .label").each(function(e,a){t(a).append(i.selected_item_template)}),this._element.find("ul.variable-items-wrapper").each(function(i,a){t(this).parent().addClass("woo-variation-items-wrapper");var o=t(this).siblings("select.woo-variation-raw-select"),s="",n=t(this).siblings("select.woo-variation-raw-select").find("option"),r=t(this).siblings("select.woo-variation-raw-select").find("option:disabled"),c=t(this).siblings("select.woo-variation-raw-select").find("option:selected"),l=t(this).siblings("select.woo-variation-raw-select").find("option").eq(1),d=t(this).find("li:not(.woo-variation-swatches-variable-item-more)"),h=t(this).hasClass("reselect-clear"),v=t(this).data("attribute_name"),u=(e.is_ajax_variation||e._generated[v],e.is_ajax_variation||e._out_of_stock[v],[]),f=[],w=t(this).parent().prev().find(".woo-selected-variation-item-name");n.length<1&&(o=t(this).parent().find("select.woo-variation-raw-select"),n=t(this).parent().find("select.woo-variation-raw-select").find("option"),r=t(this).parent().find("select.woo-variation-raw-select").find("option:disabled"),c=t(this).parent().find("select.woo-variation-raw-select").find("option:selected"),l=t(this).parent().find("select.woo-variation-raw-select").find("option").eq(1)),n.each(function(){""!==t(this).val()&&(u.push(t(this).val()),s=c?c.val():l.val())}),r.each(function(){""!==t(this).val()&&f.push(t(this).val())});var p=_.difference(u,f);d.each(function(i,e){var a=t(this).attr("data-value"),o=t(this).attr("data-title");t(this).removeClass("selected disabled").addClass("disabled"),t(this).attr("aria-checked","false"),t(this).attr("tabindex","-1"),t(this).hasClass("radio-variable-item")&&t(this).find("input.wvs-radio-variable-item:radio").prop("disabled",!0).prop("checked",!1),_.contains(p,a)&&(t(this).removeClass("selected disabled"),t(this).removeAttr("aria-hidden"),t(this).attr("tabindex","0"),t(this).find("input.wvs-radio-variable-item:radio").prop("disabled",!1),a===s&&(t(this).addClass("selected"),t(this).attr("aria-checked","true"),woo_variation_swatches_options.show_variation_label&&w.text(": "+o),t(this).hasClass("radio-variable-item")&&t(this).find("input.wvs-radio-variable-item:radio").prop("checked",!0)))}),h?(t(this).on("click.wvs","li:not(.selected):not(.radio-variable-item):not(.woo-variation-swatches-variable-item-more)",function(i){i.preventDefault(),i.stopPropagation();var a=t(this).data("value");o.val(a).trigger("change"),o.trigger("click"),o.trigger("focusin"),e.is_mobile&&o.trigger("touchstart"),t(this).trigger("focus"),t(this).trigger("wvs-selected-item",[a,o,e._element])}),t(this).on("click.wvs","li.selected:not(.radio-variable-item):not(.woo-variation-swatches-variable-item-more)",function(i){i.preventDefault(),i.stopPropagation();var a=t(this).val();o.val("").trigger("change"),o.trigger("click"),o.trigger("focusin"),e.is_mobile&&o.trigger("touchstart"),t(this).trigger("focus"),t(this).trigger("wvs-unselected-item",[a,o,e._element])}),t(this).on("click.wvs","input.wvs-radio-variable-item:radio",function(i){i.stopPropagation(),t(this).trigger("change.wvs",{radioChange:!0})}),t(this).on("change.wvs","input.wvs-radio-variable-item:radio",function(i,a){if(i.preventDefault(),i.stopPropagation(),a&&a.radioChange){var s=t(this).val();t(this).parent("li.radio-variable-item").hasClass("selected")?(o.val("").trigger("change"),t(this).parent("li.radio-variable-item").trigger("wvs-unselected-item",[s,o,e._element])):(o.val(s).trigger("change"),t(this).parent("li.radio-variable-item").trigger("wvs-selected-item",[s,o,e._element])),o.trigger("click"),o.trigger("focusin"),e.is_mobile&&o.trigger("touchstart")}})):(t(this).on("click.wvs","li:not(.radio-variable-item):not(.woo-variation-swatches-variable-item-more)",function(i){i.preventDefault(),i.stopPropagation();var a=t(this).data("value");o.val(a).trigger("change"),o.trigger("click"),o.trigger("focusin"),e.is_mobile&&o.trigger("touchstart"),t(this).trigger("focus"),t(this).trigger("wvs-selected-item",[a,o,e._element])}),t(this).on("change.wvs","input.wvs-radio-variable-item:radio",function(i){i.preventDefault(),i.stopPropagation();var a=t(this).val();o.val(a).trigger("change"),o.trigger("click"),o.trigger("focusin"),e.is_mobile&&o.trigger("touchstart"),t(this).parent("li.radio-variable-item").removeClass("selected disabled").addClass("selected"),t(this).parent("li.radio-variable-item").trigger("wvs-selected-item",[a,o,e._element])})),t(this).on("keydown.wvs","li:not(.disabled):not(.woo-variation-swatches-variable-item-more)",function(i){(i.keyCode&&32===i.keyCode||i.key&&" "===i.key||i.keyCode&&13===i.keyCode||i.key&&"enter"===i.key.toLowerCase())&&(i.preventDefault(),t(this).trigger("click.wvs"))})}),this._element.trigger("woo_variation_swatches_init",[this,this.product_variations]),t(document).trigger("woo_variation_swatches_loaded",[this._element,this.product_variations])}},{key:"update",value:function(){var i=this;this._element.on("woocommerce_variation_has_changed.wvs",function(e){t(this).find("ul.variable-items-wrapper").each(function(e,a){t(this).siblings("select.woo-variation-raw-select");var o="",s=t(this).siblings("select.woo-variation-raw-select").find("option"),n=t(this).siblings("select.woo-variation-raw-select").find("option:disabled"),r=t(this).siblings("select.woo-variation-raw-select").find("option:selected"),c=t(this).siblings("select.woo-variation-raw-select").find("option").eq(1),l=t(this).find("li:not(.woo-variation-swatches-variable-item-more)"),d=t(this).data("attribute_name"),h=(i.is_ajax_variation||i._generated[d],i.is_ajax_variation||i._out_of_stock[d],[]),v=[],u=t(this).parent().prev().find(".woo-selected-variation-item-name");s.length<1&&(t(this).parent().find("select.woo-variation-raw-select"),s=t(this).parent().find("select.woo-variation-raw-select").find("option"),n=t(this).parent().find("select.woo-variation-raw-select").find("option:disabled"),r=t(this).parent().find("select.woo-variation-raw-select").find("option:selected"),c=t(this).parent().find("select.woo-variation-raw-select").find("option").eq(1)),s.each(function(){""!==t(this).val()&&(h.push(t(this).val()),o=r?r.val():c.val())}),n.each(function(){""!==t(this).val()&&v.push(t(this).val())});var f=_.difference(h,v);i.is_ajax_variation?l.each(function(e,a){var s=t(this).attr("data-value"),n=t(this).attr("data-title");t(this).removeClass("selected disabled"),t(this).attr("aria-checked","false"),o.length<1&&woo_variation_swatches_options.show_variation_label&&u.text(""),s===o&&(t(this).addClass("selected"),t(this).attr("aria-checked","true"),woo_variation_swatches_options.show_variation_label&&u.text(": "+n),t(this).hasClass("radio-variable-item")&&t(this).find("input.wvs-radio-variable-item:radio").prop("disabled",!1).prop("checked",!0)),t(this).trigger("wvs-item-updated",[o,s,i])}):l.each(function(e,a){var s=t(this).attr("data-value"),n=t(this).attr("data-title");t(this).removeClass("selected disabled").addClass("disabled"),t(this).attr("aria-checked","false"),t(this).attr("tabindex","-1"),t(this).hasClass("radio-variable-item")&&t(this).find("input.wvs-radio-variable-item:radio").prop("disabled",!0).prop("checked",!1),_.contains(f,s)&&(t(this).removeClass("selected disabled"),t(this).removeAttr("aria-hidden"),t(this).attr("tabindex","0"),t(this).find("input.wvs-radio-variable-item:radio").prop("disabled",!1),o.length<1&&woo_variation_swatches_options.show_variation_label&&u.text(""),s===o&&(t(this).addClass("selected"),t(this).attr("aria-checked","true"),woo_variation_swatches_options.show_variation_label&&u.text(": "+n),t(this).hasClass("radio-variable-item")&&t(this).find("input.wvs-radio-variable-item:radio").prop("checked",!0))),t(this).trigger("wvs-item-updated",[o,s,i])}),t(this).trigger("wvs-items-updated")})})}}],[{key:"_jQueryInterface",value:function(t){return this.each(function(){new e(this,t)})}}]),e}();return t.fn.WooVariationSwatches=e._jQueryInterface,t.fn.WooVariationSwatches.Constructor=e,t.fn.WooVariationSwatches.noConflict=function(){return t.fn.WooVariationSwatches=t.fn.WooVariationSwatches,e._jQueryInterface},e}(jQuery);i.default=o},9:function(t,i,e){t.exports=e(10)}});
assets/js/gwp-admin.js CHANGED
@@ -1,8 +1,8 @@
1
  /*!
2
- * Variation Swatches for WooCommerce v1.1.1
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
- * Date: 11/16/2020, 8:52:49 PM
6
  * Released under the GPLv3 license.
7
  */
8
  /******/ (function(modules) { // webpackBootstrap
1
  /*!
2
+ * Variation Swatches for WooCommerce v1.1.2
3
  *
4
  * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
+ * Date: 11/26/2020, 7:20:28 PM
6
  * Released under the GPLv3 license.
7
  */
8
  /******/ (function(modules) { // webpackBootstrap
assets/js/gwp-backbone-modal.js CHANGED
@@ -128,12 +128,13 @@
128
  $(event.target).prop('disabled', true).text($(event.target).data('deactivating')).next().addClass('visible');
129
 
130
  wp.ajax.send(form.action, {
131
- form: form,
132
  success: function success(response) {
133
  window.location.replace(data.deactivate_link);
134
  _this.closeButton(event);
135
  },
136
  error: function error() {
 
137
  window.location.replace(data.deactivate_link);
138
  _this.closeButton(event);
139
  }
128
  $(event.target).prop('disabled', true).text($(event.target).data('deactivating')).next().addClass('visible');
129
 
130
  wp.ajax.send(form.action, {
131
+ data: form,
132
  success: function success(response) {
133
  window.location.replace(data.deactivate_link);
134
  _this.closeButton(event);
135
  },
136
  error: function error() {
137
+ console.error('Deactivation Not logged.');
138
  window.location.replace(data.deactivate_link);
139
  _this.closeButton(event);
140
  }
assets/js/gwp-backbone-modal.min.js CHANGED
@@ -1 +1 @@
1
- !function(n,t,a){"use strict";n.fn.GWPBackboneModal=function(t){return this.each(function(){new n.GWPBackboneModal(n(this),t)})},n.GWPBackboneModal=function(t,e){e=n.extend({},n.GWPBackboneModal.defaultOptions,e);e.template&&new n.GWPBackboneModal.View({target:e.template,string:e.data})},n.GWPBackboneModal.defaultOptions={template:"",data:{}},n.GWPBackboneModal.View=t.View.extend({tagName:"div",id:"gwp-backbone-modal-dialog",_target:void 0,_string:void 0,events:{"click .modal-close":"closeButton","click #btn-ok":"addButton","click #send-ajax":"sendAjax","touchstart #btn-ok":"addButton",keydown:"keyboardActions","change :radio":"optionChange"},resizeContent:function(){var t=n(".gwp-backbone-modal-content").find("article"),e=.75*n(window).height();t.css({"max-height":e+"px"})},initialize:function(t){var e=this;this._target=t.target,this._string=t.string,a.bindAll(this,"render"),this.render(),n(window).resize(function(){e.resizeContent()})},render:function(){var t=wp.template(this._target);this.$el.append(t(this._string)),n(document.body).css({overflow:"hidden"}).append(this.$el),this.resizeContent(),this.$(".gwp-backbone-modal-content").attr("tabindex","0").focus(),n(document.body).trigger("gwp_backbone_modal_loaded",this._target)},closeButton:function(t){t.preventDefault(),n(document.body).trigger("gwp_backbone_modal_before_remove",this._target),this.undelegateEvents(),n(document).off("focusin"),n(document.body).css({overflow:"auto"}),this.remove(),n(document.body).trigger("gwp_backbone_modal_removed",this._target)},addButton:function(t){n(document.body).trigger("gwp_backbone_modal_response",[this._target,this.getFormData()]),this.closeButton(t)},sendAjax:function(t){var e=this;t.preventDefault();var a=this.getFormData(),o=this._string;void 0!==a.reason_type?(n(t.target).prop("disabled",!0).text(n(t.target).data("deactivating")).next().addClass("visible"),wp.ajax.send(a.action,{form:a,success:function(){window.location.replace(o.deactivate_link),e.closeButton(t)},error:function(){window.location.replace(o.deactivate_link),e.closeButton(t)}})):this.closeButton(t)},optionChange:function(t){n(t.target).closest(".feedback-dialog-form-body").find(".feedback-text").prop("disabled",!0).hide(),n(t.target).nextAll(".feedback-text").prop("disabled",!1).show().focus()},getFormData:function(){var a={};return n(document.body).trigger("gwp_backbone_modal_before_update",this._target),n.each(n("form",this.$el).serializeArray(),function(t,e){-1!==e.name.indexOf("[]")?(e.name=e.name.replace("[]",""),a[e.name]=n.makeArray(a[e.name]),a[e.name].push(e.value)):a[e.name]=e.value}),a},keyboardActions:function(t){var e=t.keyCode||t.which;13!==e||t.target.tagName&&("input"===t.target.tagName.toLowerCase()||"textarea"===t.target.tagName.toLowerCase())||this.addButton(t),27===e&&this.closeButton(t)}})}(jQuery,Backbone,_);
1
+ !function(n,t,a){"use strict";n.fn.GWPBackboneModal=function(t){return this.each(function(){new n.GWPBackboneModal(n(this),t)})},n.GWPBackboneModal=function(t,e){e=n.extend({},n.GWPBackboneModal.defaultOptions,e);e.template&&new n.GWPBackboneModal.View({target:e.template,string:e.data})},n.GWPBackboneModal.defaultOptions={template:"",data:{}},n.GWPBackboneModal.View=t.View.extend({tagName:"div",id:"gwp-backbone-modal-dialog",_target:void 0,_string:void 0,events:{"click .modal-close":"closeButton","click #btn-ok":"addButton","click #send-ajax":"sendAjax","touchstart #btn-ok":"addButton",keydown:"keyboardActions","change :radio":"optionChange"},resizeContent:function(){var t=n(".gwp-backbone-modal-content").find("article"),e=.75*n(window).height();t.css({"max-height":e+"px"})},initialize:function(t){var e=this;this._target=t.target,this._string=t.string,a.bindAll(this,"render"),this.render(),n(window).resize(function(){e.resizeContent()})},render:function(){var t=wp.template(this._target);this.$el.append(t(this._string)),n(document.body).css({overflow:"hidden"}).append(this.$el),this.resizeContent(),this.$(".gwp-backbone-modal-content").attr("tabindex","0").focus(),n(document.body).trigger("gwp_backbone_modal_loaded",this._target)},closeButton:function(t){t.preventDefault(),n(document.body).trigger("gwp_backbone_modal_before_remove",this._target),this.undelegateEvents(),n(document).off("focusin"),n(document.body).css({overflow:"auto"}),this.remove(),n(document.body).trigger("gwp_backbone_modal_removed",this._target)},addButton:function(t){n(document.body).trigger("gwp_backbone_modal_response",[this._target,this.getFormData()]),this.closeButton(t)},sendAjax:function(t){var e=this;t.preventDefault();var a=this.getFormData(),o=this._string;void 0!==a.reason_type?(n(t.target).prop("disabled",!0).text(n(t.target).data("deactivating")).next().addClass("visible"),wp.ajax.send(a.action,{data:a,success:function(){window.location.replace(o.deactivate_link),e.closeButton(t)},error:function(){window.location.replace(o.deactivate_link),e.closeButton(t)}})):this.closeButton(t)},optionChange:function(t){n(t.target).closest(".feedback-dialog-form-body").find(".feedback-text").prop("disabled",!0).hide(),n(t.target).nextAll(".feedback-text").prop("disabled",!1).show().focus()},getFormData:function(){var a={};return n(document.body).trigger("gwp_backbone_modal_before_update",this._target),n.each(n("form",this.$el).serializeArray(),function(t,e){-1!==e.name.indexOf("[]")?(e.name=e.name.replace("[]",""),a[e.name]=n.makeArray(a[e.name]),a[e.name].push(e.value)):a[e.name]=e.value}),a},keyboardActions:function(t){var e=t.keyCode||t.which;13!==e||t.target.tagName&&("input"===t.target.tagName.toLowerCase()||"textarea"===t.target.tagName.toLowerCase())||this.addButton(t),27===e&&this.closeButton(t)}})}(jQuery,Backbone,_);
includes/class-woo-variation-swatches-cache.php ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ defined( 'ABSPATH' ) || exit;
4
+
5
+
6
+ /**
7
+ * How to use:
8
+ *
9
+ * $cache = new Woo_Variation_Swatches_Cache( 'name', 'group' );
10
+ * $cache->delete_transient();
11
+ * $cache->delete_all_transient();
12
+ * $cache->delete_all_transient_from_db();
13
+ *
14
+ * if ( false === ( $results = $cache->get_transient() ) ) {
15
+ * // It wasn't there, so regenerate the data and save the transient
16
+ * $results = 'GENERATED DATA';
17
+ * $cache->set_transient( $results );
18
+ * }
19
+ *
20
+ *
21
+ * echo $results;
22
+ *
23
+ * print_r( Woo_Variation_Swatches_Cache::get_transients() );
24
+ */
25
+
26
+
27
+ if ( ! class_exists( 'Woo_Variation_Swatches_Cache' ) ) {
28
+ class Woo_Variation_Swatches_Cache {
29
+
30
+ private $name;
31
+ private $group_name;
32
+ static $transients = array();
33
+
34
+ public function __construct( $name, $group_name ) {
35
+ $this->name = $name;
36
+ $this->group_name = $group_name;
37
+
38
+ if ( empty( self::$transients[ $this->group_name ] ) ) {
39
+ self::$transients[ $this->group_name ] = array( $this->name );
40
+ } else {
41
+ self::$transients[ $this->group_name ][] = $this->name;
42
+ }
43
+
44
+ return $this;
45
+ }
46
+
47
+ public static function get_transients() {
48
+ return self::$transients;
49
+ }
50
+
51
+ // Transient Cache
52
+ public function get_transient_group() {
53
+ return WC_Cache_Helper::get_transient_version( $this->group_name );
54
+ }
55
+
56
+ public function get_transient_name() {
57
+ return $this->name;
58
+ }
59
+
60
+ // the name should be 172 characters or less in length
61
+ public function set_transient( $value, $expiration = 0 ) {
62
+
63
+ $transient_version = $this->get_transient_group();
64
+ $transient_value = array(
65
+ 'version' => $transient_version,
66
+ 'value' => $value,
67
+ );
68
+
69
+ return set_transient( $this->get_transient_name(), $transient_value, $expiration );
70
+ }
71
+
72
+ public function get_transient( $transient = false ) {
73
+
74
+ $transient_name = $transient ? $transient : $this->get_transient_name();
75
+
76
+ $transient_version = $this->get_transient_group();
77
+ $transient_value = get_transient( $transient_name );
78
+
79
+ if ( isset( $transient_value[ 'value' ], $transient_value[ 'version' ] ) && $transient_value[ 'version' ] === $transient_version ) {
80
+ return $transient_value[ 'value' ];
81
+ }
82
+
83
+ return false;
84
+ }
85
+
86
+ public function delete_transient( $transient = false ) {
87
+
88
+ $transient_name = $transient ? $transient : $this->get_transient_name();
89
+
90
+ return delete_transient( $transient_name );
91
+ }
92
+
93
+ public function delete_all_transient( $transient_group = false ) {
94
+
95
+ $group_name = $transient_group ? $transient_group : $this->group_name;
96
+
97
+ WC_Cache_Helper::get_transient_version( $group_name, true );
98
+ }
99
+
100
+ public function delete_all_transient_from_db( $transient_name = false, $transient_group = false ) {
101
+
102
+ if ( ! wp_using_ext_object_cache() ) {
103
+ global $wpdb;
104
+
105
+ $name = sprintf( '_transient_%s', ( $transient_name ? $transient_name : $this->name ) );
106
+ $group = sprintf( '_transient_%s-transient-version', ( $transient_group ? $transient_group : $this->group_name ) );
107
+
108
+ // Delete Version
109
+ $sql_1 = $wpdb->prepare( "DELETE FROM {$wpdb->options} WHERE option_name LIKE %s LIMIT %d;", $group, 100 );
110
+ $wpdb->query( $sql_1 ); // WPCS: cache ok, db call ok.
111
+
112
+ // Delete Name
113
+ $sql_2 = $wpdb->prepare( "DELETE FROM {$wpdb->options} WHERE option_name LIKE %s LIMIT %d;", $name, 10 );
114
+ $wpdb->query( $sql_2 ); // WPCS: cache ok, db call ok.
115
+
116
+ }
117
+ }
118
+
119
+ // Object cache
120
+ public function get_cache_key( $name = false ) {
121
+ return WC_Cache_Helper::get_cache_prefix( $this->group_name ) . ( $name ? $name : $this->name );
122
+ }
123
+
124
+ public function set_cache( $value, $name = false ) {
125
+ $cache_key = $this->get_cache_key( $name );
126
+ wp_cache_set( $cache_key, $value, $this->group_name );
127
+ }
128
+
129
+ public function get_cache( $cache_key = false ) {
130
+
131
+ $cache_key = $cache_key ? $cache_key : $this->get_cache_key( $cache_key );
132
+
133
+ return wp_cache_get( $cache_key, $this->group_name );
134
+ }
135
+
136
+ public function delete_cache( $cache_key = false ) {
137
+
138
+ $cache_key = $cache_key ? $cache_key : $this->get_cache_key( $cache_key );
139
+
140
+ return wp_cache_delete( $cache_key, $this->group_name );
141
+ }
142
+
143
+ public function delete_all_cache( $group_name = false ) {
144
+
145
+ $name = $group_name ? $group_name : $this->group_name;
146
+ WC_Cache_Helper::invalidate_cache_group( $name );
147
+ }
148
+ }
149
+ }
150
+
includes/class-wvs-settings-api.php CHANGED
@@ -222,6 +222,10 @@
222
  }
223
  }
224
 
 
 
 
 
225
  public function update_option( $key, $value ) {
226
  $options = get_option( $this->settings_name );
227
  $options[ $key ] = $value;
222
  }
223
  }
224
 
225
+ public function get_options() {
226
+ return get_option( $this->settings_name );
227
+ }
228
+
229
  public function update_option( $key, $value ) {
230
  $options = get_option( $this->settings_name );
231
  $options[ $key ] = $value;
includes/functions.php CHANGED
@@ -202,7 +202,7 @@
202
  if ( is_ajax() && isset( $_GET[ 'product_id' ] ) ) {
203
  $product_id = absint( $_GET[ 'product_id' ] );
204
  $product = wc_get_product( $product_id );
205
- $available_variations = array_values( $product->get_available_variations() );
206
 
207
  wp_send_json_success( wp_json_encode( $available_variations ) );
208
  } else {
@@ -756,21 +756,23 @@
756
  if ( ! function_exists( 'wvs_get_wc_attribute_taxonomy' ) ):
757
  function wvs_get_wc_attribute_taxonomy( $attribute_name ) {
758
 
759
- $transient_name = sprintf( 'wvs_get_wc_attribute_taxonomy_%s', $attribute_name );
 
 
760
 
761
  if ( isset( $_GET[ 'wvs_clear_transient' ] ) ) {
762
- delete_transient( $transient_name );
763
  }
764
 
765
- $attribute_taxonomy = get_transient( $transient_name );
766
-
767
- if ( false === $attribute_taxonomy ) {
768
  global $wpdb;
 
769
  $attribute_name = str_replace( 'pa_', '', wc_sanitize_taxonomy_name( $attribute_name ) );
770
 
771
  $attribute_taxonomy = $wpdb->get_row( "SELECT * FROM " . $wpdb->prefix . "woocommerce_attribute_taxonomies WHERE attribute_name='{$attribute_name}'" );
772
 
773
- set_transient( $transient_name, $attribute_taxonomy );
774
  }
775
 
776
  return apply_filters( 'wvs_get_wc_attribute_taxonomy', $attribute_taxonomy, $attribute_name );
@@ -793,7 +795,6 @@
793
  return $attribute_name_clean === $attribute->attribute_name;
794
  } ) );
795
 
796
-
797
  if ( ! empty( $attribute ) ) {
798
  $attribute = apply_filters( 'wvs_get_wc_attribute_taxonomy', $attribute[ 0 ], $attribute_name );
799
  } else {
@@ -847,9 +848,11 @@
847
  if ( in_array( $term->slug, $options ) ) {
848
 
849
  // aria-checked="false"
 
 
850
  $is_selected = ( sanitize_title( $args[ 'selected' ] ) == $term->slug );
851
  $selected_class = $is_selected ? 'selected' : '';
852
- $tooltip = trim( apply_filters( 'wvs_variable_item_tooltip', $term->name, $term, $args ) );
853
 
854
  $tooltip_html_attr = ! empty( $tooltip ) ? sprintf( ' data-wvstooltip="%s"', esc_attr( $tooltip ) ) : '';
855
  $screen_reader_html_attr = $is_selected ? ' aria-checked="true"' : ' aria-checked="false"';
@@ -858,7 +861,7 @@
858
  $tooltip_html_attr .= ! empty( $tooltip ) ? ' tabindex="2"' : '';
859
  }
860
 
861
- $data .= sprintf( '<li %1$s class="variable-item %2$s-variable-item %2$s-variable-item-%3$s %4$s" title="%5$s" data-title="%5$s" data-value="%3$s" role="radio" tabindex="0">', $screen_reader_html_attr . $tooltip_html_attr, esc_attr( $type ), esc_attr( $term->slug ), esc_attr( $selected_class ), esc_html( $term->name ) );
862
 
863
  switch ( $type ):
864
  case 'color':
@@ -873,18 +876,18 @@
873
  $image = wp_get_attachment_image_src( $attachment_id, apply_filters( 'wvs_product_attribute_image_size', $image_size ) );
874
  // $image_html = wp_get_attachment_image( $attachment_id, apply_filters( 'wvs_product_attribute_image_size', $image_size ), false, array( 'class' => '' ) );
875
 
876
- $data .= sprintf( '<img aria-hidden="true" alt="%s" src="%s" width="%d" height="%d" />', esc_attr( $term->name ), esc_url( $image[ 0 ] ), $image[ 1 ], $image[ 2 ] );
877
 
878
  break;
879
 
880
 
881
  case 'button':
882
- $data .= sprintf( '<span class="variable-item-span variable-item-span-%s">%s</span>', esc_attr( $type ), esc_html( $term->name ) );
883
  break;
884
 
885
  case 'radio':
886
  $id = uniqid( $term->slug );
887
- $data .= sprintf( '<input name="%1$s" id="%2$s" class="wvs-radio-variable-item" %3$s type="radio" value="%4$s" data-title="%5$s" data-value="%4$s" /><label for="%2$s">%5$s</label>', $name, $id, checked( sanitize_title( $args[ 'selected' ] ), $term->slug, false ), esc_attr( $term->slug ), esc_html( $term->name ) );
888
  break;
889
 
890
  default:
@@ -926,12 +929,14 @@
926
  $terms = wc_get_product_terms( $product->get_id(), $attribute, array( 'fields' => 'all' ) );
927
  $name = uniqid( wc_variation_attribute_name( $attribute ) );
928
  foreach ( $terms as $term ) {
929
- if ( in_array( $term->slug, $options ) ) {
 
 
930
 
931
  $is_selected = ( sanitize_title( $args[ 'selected' ] ) == $term->slug );
932
 
933
  $selected_class = $is_selected ? 'selected' : '';
934
- $tooltip = trim( apply_filters( 'wvs_variable_item_tooltip', $term->name, $term, $args ) );
935
 
936
  if ( $is_archive && ! $show_archive_tooltip ) {
937
  $tooltip = false;
@@ -951,7 +956,7 @@
951
  $type = 'button';
952
  }
953
 
954
- $data .= sprintf( '<li %1$s class="variable-item %2$s-variable-item %2$s-variable-item-%3$s %4$s" title="%5$s" data-title="%5$s" data-value="%3$s" role="radio" tabindex="0">', $screen_reader_html_attr . $tooltip_html_attr, esc_attr( $type ), esc_attr( $term->slug ), esc_attr( $selected_class ), esc_html( $term->name ) );
955
 
956
  switch ( $type ):
957
 
@@ -960,13 +965,13 @@
960
  $image_size = sanitize_text_field( woo_variation_swatches()->get_option( 'attribute_image_size' ) );
961
  $image = wp_get_attachment_image_src( $attachment_id, apply_filters( 'wvs_product_attribute_image_size', $image_size ) );
962
  // $image_html = wp_get_attachment_image( $attachment_id, apply_filters( 'wvs_product_attribute_image_size', $image_size ), false, array( 'class' => '' ) );
963
- $data .= sprintf( '<img aria-hidden="true" alt="%s" src="%s" width="%d" height="%d" />', esc_attr( apply_filters( 'woocommerce_variation_option_name', $term->name, $term, $attribute, $product ) ), esc_url( $image[ 0 ] ), $image[ 1 ], $image[ 2 ] );
964
  // $data .= $image_html;
965
  break;
966
 
967
 
968
  case 'button':
969
- $data .= sprintf( '<span class="variable-item-span variable-item-span-%s">%s</span>', esc_attr( $type ), esc_html( apply_filters( 'woocommerce_variation_option_name', $term->name, $term, $attribute, $product ) ) );
970
  break;
971
 
972
  default:
@@ -986,7 +991,7 @@
986
  $is_selected = ( sanitize_title( $option ) == sanitize_title( $args[ 'selected' ] ) );
987
 
988
  $selected_class = $is_selected ? 'selected' : '';
989
- $tooltip = trim( apply_filters( 'wvs_variable_item_tooltip', esc_attr( $option ), $options, $args ) );
990
 
991
 
992
  if ( $is_archive && ! $show_archive_tooltip ) {
@@ -1087,15 +1092,15 @@
1087
  $terms = wc_get_product_terms( $product->get_id(), $attribute, array( 'fields' => 'all' ) );
1088
 
1089
  foreach ( $terms as $term ) {
1090
- if ( in_array( $term->slug, $options ) ) {
1091
- echo '<option value="' . esc_attr( $term->slug ) . '" ' . selected( sanitize_title( $args[ 'selected' ] ), $term->slug, false ) . '>' . apply_filters( 'woocommerce_variation_option_name', $term->name ) . '</option>';
1092
  }
1093
  }
1094
  } else {
1095
  foreach ( $options as $option ) {
1096
  // This handles < 2.4.0 bw compatibility where text attributes were not sanitized.
1097
  $selected = sanitize_title( $args[ 'selected' ] ) === $args[ 'selected' ] ? selected( $args[ 'selected' ], sanitize_title( $option ), false ) : selected( $args[ 'selected' ], $option, false );
1098
- echo '<option value="' . esc_attr( $option ) . '" ' . $selected . '>' . esc_html( apply_filters( 'woocommerce_variation_option_name', $option ) ) . '</option>';
1099
  }
1100
  }
1101
  }
@@ -1161,15 +1166,15 @@
1161
  $terms = wc_get_product_terms( $product->get_id(), $attribute, array( 'fields' => 'all' ) );
1162
 
1163
  foreach ( $terms as $term ) {
1164
- if ( in_array( $term->slug, $options ) ) {
1165
- echo '<option value="' . esc_attr( $term->slug ) . '" ' . selected( sanitize_title( $args[ 'selected' ] ), $term->slug, false ) . '>' . apply_filters( 'woocommerce_variation_option_name', $term->name ) . '</option>';
1166
  }
1167
  }
1168
  } else {
1169
  foreach ( $options as $option ) {
1170
  // This handles < 2.4.0 bw compatibility where text attributes were not sanitized.
1171
  $selected = sanitize_title( $args[ 'selected' ] ) === $args[ 'selected' ] ? selected( $args[ 'selected' ], sanitize_title( $option ), false ) : selected( $args[ 'selected' ], $option, false );
1172
- echo '<option value="' . esc_attr( $option ) . '" ' . $selected . '>' . esc_html( apply_filters( 'woocommerce_variation_option_name', $option ) ) . '</option>';
1173
  }
1174
  }
1175
  }
@@ -1232,15 +1237,15 @@
1232
  $terms = wc_get_product_terms( $product->get_id(), $attribute, array( 'fields' => 'all' ) );
1233
 
1234
  foreach ( $terms as $term ) {
1235
- if ( in_array( $term->slug, $options ) ) {
1236
- echo '<option value="' . esc_attr( $term->slug ) . '" ' . selected( sanitize_title( $args[ 'selected' ] ), $term->slug, false ) . '>' . apply_filters( 'woocommerce_variation_option_name', $term->name ) . '</option>';
1237
  }
1238
  }
1239
  } else {
1240
  foreach ( $options as $option ) {
1241
  // This handles < 2.4.0 bw compatibility where text attributes were not sanitized.
1242
  $selected = sanitize_title( $args[ 'selected' ] ) === $args[ 'selected' ] ? selected( $args[ 'selected' ], sanitize_title( $option ), false ) : selected( $args[ 'selected' ], $option, false );
1243
- echo '<option value="' . esc_attr( $option ) . '" ' . $selected . '>' . esc_html( apply_filters( 'woocommerce_variation_option_name', $option ) ) . '</option>';
1244
  }
1245
  }
1246
  }
@@ -1253,8 +1258,7 @@
1253
  }
1254
  endif;
1255
 
1256
-
1257
- // Default Button
1258
  if ( ! function_exists( 'wvs_default_button_variation_attribute_options' ) ) :
1259
  function wvs_default_button_variation_attribute_options( $args = array() ) {
1260
 
@@ -1301,15 +1305,15 @@
1301
  $terms = wc_get_product_terms( $product->get_id(), $attribute, array( 'fields' => 'all' ) );
1302
 
1303
  foreach ( $terms as $term ) {
1304
- if ( in_array( $term->slug, $options ) ) {
1305
- echo '<option value="' . esc_attr( $term->slug ) . '" ' . selected( sanitize_title( $args[ 'selected' ] ), $term->slug, false ) . '>' . esc_html( apply_filters( 'woocommerce_variation_option_name', $term->name ) ) . '</option>';
1306
  }
1307
  }
1308
  } else {
1309
  foreach ( $options as $option ) {
1310
  // This handles < 2.4.0 bw compatibility where text attributes were not sanitized.
1311
  $selected = sanitize_title( $args[ 'selected' ] ) === $args[ 'selected' ] ? selected( $args[ 'selected' ], sanitize_title( $option ), false ) : selected( $args[ 'selected' ], $option, false );
1312
- echo '<option value="' . esc_attr( $option ) . '" ' . $selected . '>' . esc_html( apply_filters( 'woocommerce_variation_option_name', $option ) ) . '</option>';
1313
  }
1314
  }
1315
  }
@@ -1322,7 +1326,7 @@
1322
  }
1323
  endif;
1324
 
1325
- // Default Image
1326
  if ( ! function_exists( 'wvs_default_image_variation_attribute_options' ) ) :
1327
  function wvs_default_image_variation_attribute_options( $args = array() ) {
1328
 
@@ -1374,15 +1378,15 @@
1374
  $terms = wc_get_product_terms( $product->get_id(), $attribute, array( 'fields' => 'all' ) );
1375
 
1376
  foreach ( $terms as $term ) {
1377
- if ( in_array( $term->slug, $options ) ) {
1378
- echo '<option value="' . esc_attr( $term->slug ) . '" ' . selected( sanitize_title( $args[ 'selected' ] ), $term->slug, false ) . '>' . esc_html( apply_filters( 'woocommerce_variation_option_name', $term->name ) ) . '</option>';
1379
  }
1380
  }
1381
  } else {
1382
  foreach ( $options as $option ) {
1383
  // This handles < 2.4.0 bw compatibility where text attributes were not sanitized.
1384
  $selected = sanitize_title( $args[ 'selected' ] ) === $args[ 'selected' ] ? selected( $args[ 'selected' ], sanitize_title( $option ), false ) : selected( $args[ 'selected' ], $option, false );
1385
- echo '<option value="' . esc_attr( $option ) . '" ' . $selected . '>' . esc_html( apply_filters( 'woocommerce_variation_option_name', $option ) ) . '</option>';
1386
  }
1387
  }
1388
  }
@@ -1449,15 +1453,15 @@
1449
  $terms = wc_get_product_terms( $product->get_id(), $attribute, array( 'fields' => 'all' ) );
1450
 
1451
  foreach ( $terms as $term ) {
1452
- if ( in_array( $term->slug, $options ) ) {
1453
- echo '<option value="' . esc_attr( $term->slug ) . '" ' . selected( sanitize_title( $args[ 'selected' ] ), $term->slug, false ) . '>' . esc_html( apply_filters( 'woocommerce_variation_option_name', $term->name ) ) . '</option>';
1454
  }
1455
  }
1456
  } else {
1457
  foreach ( $options as $option ) {
1458
  // This handles < 2.4.0 bw compatibility where text attributes were not sanitized.
1459
  $selected = sanitize_title( $args[ 'selected' ] ) === $args[ 'selected' ] ? selected( $args[ 'selected' ], sanitize_title( $option ), false ) : selected( $args[ 'selected' ], $option, false );
1460
- echo '<option value="' . esc_attr( $option ) . '" ' . $selected . '>' . esc_html( apply_filters( 'woocommerce_variation_option_name', $option ) ) . '</option>';
1461
  }
1462
  }
1463
  }
@@ -1481,8 +1485,6 @@
1481
  return $html;
1482
  }
1483
 
1484
- //return $html;
1485
-
1486
  // WooCommerce Product Bundle Fixing
1487
  if ( isset( $_POST[ 'action' ] ) && $_POST[ 'action' ] === 'woocommerce_configure_bundle_order_item' ) {
1488
  return $html;
@@ -1492,27 +1494,24 @@
1492
  // $attribute_id = sanitize_title( $args[ 'attribute' ] );
1493
  $product_id = $args[ 'product' ]->get_id();
1494
 
 
 
 
 
1495
 
1496
- $transient_type = ( isset( $args[ 'is_archive' ] ) && $args[ 'is_archive' ] ) ? "archive_" . $product_id . "_" . $attribute_id : $product_id . "_" . $attribute_id;
1497
- $transient_name = 'wvs_attribute_html_' . $transient_type;
1498
 
1499
- $archive_transient_name = 'wvs_attribute_html_archive_' . $product_id . "_" . $attribute_id;
1500
- $product_transient_name = 'wvs_attribute_html_' . $product_id . "_" . $attribute_id;
1501
- $use_transient = (bool) woo_variation_swatches()->get_option( 'use_transient' );
1502
 
 
1503
  if ( isset( $_GET[ 'wvs_clear_transient' ] ) ) {
1504
- delete_transient( $transient_name );
1505
- // delete_transient( $archive_transient_name );
1506
- // delete_transient( $product_transient_name );
1507
  }
1508
- /* if ( isset( $_GET[ 'wvs_clear_transient' ] ) || ! $use_transient ) {
1509
- delete_transient( $transient_name );
1510
- delete_transient( $archive_transient_name );
1511
- delete_transient( $product_transient_name );
1512
- }*/
1513
 
 
1514
  if ( ! isset( $_GET[ 'wvs_clear_transient' ] ) && $use_transient ) {
1515
- $transient_html = get_transient( $transient_name );
1516
  if ( ! empty( $transient_html ) ) {
1517
  return $transient_html;
1518
  }
@@ -1645,8 +1644,9 @@
1645
 
1646
  $html = apply_filters( 'wvs_variation_attribute_options_html', $data, $args, $is_default_to_image, $is_default_to_button );
1647
 
 
1648
  if ( ! isset( $_GET[ 'wvs_clear_transient' ] ) && $use_transient ) {
1649
- set_transient( $transient_name, $html, HOUR_IN_SECONDS );
1650
  }
1651
 
1652
  return $html;
202
  if ( is_ajax() && isset( $_GET[ 'product_id' ] ) ) {
203
  $product_id = absint( $_GET[ 'product_id' ] );
204
  $product = wc_get_product( $product_id );
205
+ $available_variations = apply_filters( 'wvs_get_available_product_variations', array_values( $product->get_available_variations() ), $product );
206
 
207
  wp_send_json_success( wp_json_encode( $available_variations ) );
208
  } else {
756
  if ( ! function_exists( 'wvs_get_wc_attribute_taxonomy' ) ):
757
  function wvs_get_wc_attribute_taxonomy( $attribute_name ) {
758
 
759
+ $transient_name = sprintf( 'wvs_attribute_taxonomy_%s', $attribute_name );
760
+
761
+ $cache = new Woo_Variation_Swatches_Cache( $transient_name, 'wvs_attribute_taxonomy' );
762
 
763
  if ( isset( $_GET[ 'wvs_clear_transient' ] ) ) {
764
+ $cache->delete_transient();
765
  }
766
 
767
+ if ( false === ( $attribute_taxonomy = $cache->get_transient() ) ) {
768
+
 
769
  global $wpdb;
770
+
771
  $attribute_name = str_replace( 'pa_', '', wc_sanitize_taxonomy_name( $attribute_name ) );
772
 
773
  $attribute_taxonomy = $wpdb->get_row( "SELECT * FROM " . $wpdb->prefix . "woocommerce_attribute_taxonomies WHERE attribute_name='{$attribute_name}'" );
774
 
775
+ $cache->set_transient( $attribute_taxonomy );
776
  }
777
 
778
  return apply_filters( 'wvs_get_wc_attribute_taxonomy', $attribute_taxonomy, $attribute_name );
795
  return $attribute_name_clean === $attribute->attribute_name;
796
  } ) );
797
 
 
798
  if ( ! empty( $attribute ) ) {
799
  $attribute = apply_filters( 'wvs_get_wc_attribute_taxonomy', $attribute[ 0 ], $attribute_name );
800
  } else {
848
  if ( in_array( $term->slug, $options ) ) {
849
 
850
  // aria-checked="false"
851
+ $option = esc_html( apply_filters( 'woocommerce_variation_option_name', $term->name, $term, $attribute, $product ) );
852
+
853
  $is_selected = ( sanitize_title( $args[ 'selected' ] ) == $term->slug );
854
  $selected_class = $is_selected ? 'selected' : '';
855
+ $tooltip = trim( apply_filters( 'wvs_variable_item_tooltip', $option, $term, $args ) );
856
 
857
  $tooltip_html_attr = ! empty( $tooltip ) ? sprintf( ' data-wvstooltip="%s"', esc_attr( $tooltip ) ) : '';
858
  $screen_reader_html_attr = $is_selected ? ' aria-checked="true"' : ' aria-checked="false"';
861
  $tooltip_html_attr .= ! empty( $tooltip ) ? ' tabindex="2"' : '';
862
  }
863
 
864
+ $data .= sprintf( '<li %1$s class="variable-item %2$s-variable-item %2$s-variable-item-%3$s %4$s" title="%5$s" data-title="%5$s" data-value="%3$s" role="radio" tabindex="0">', $screen_reader_html_attr . $tooltip_html_attr, esc_attr( $type ), esc_attr( $term->slug ), esc_attr( $selected_class ), $option );
865
 
866
  switch ( $type ):
867
  case 'color':
876
  $image = wp_get_attachment_image_src( $attachment_id, apply_filters( 'wvs_product_attribute_image_size', $image_size ) );
877
  // $image_html = wp_get_attachment_image( $attachment_id, apply_filters( 'wvs_product_attribute_image_size', $image_size ), false, array( 'class' => '' ) );
878
 
879
+ $data .= sprintf( '<img aria-hidden="true" alt="%s" src="%s" width="%d" height="%d" />', $option, esc_url( $image[ 0 ] ), $image[ 1 ], $image[ 2 ] );
880
 
881
  break;
882
 
883
 
884
  case 'button':
885
+ $data .= sprintf( '<span class="variable-item-span variable-item-span-%s">%s</span>', esc_attr( $type ), $option );
886
  break;
887
 
888
  case 'radio':
889
  $id = uniqid( $term->slug );
890
+ $data .= sprintf( '<input name="%1$s" id="%2$s" class="wvs-radio-variable-item" %3$s type="radio" value="%4$s" data-title="%5$s" data-value="%4$s" /><label for="%2$s">%5$s</label>', $name, $id, checked( sanitize_title( $args[ 'selected' ] ), $term->slug, false ), esc_attr( $term->slug ), $option );
891
  break;
892
 
893
  default:
929
  $terms = wc_get_product_terms( $product->get_id(), $attribute, array( 'fields' => 'all' ) );
930
  $name = uniqid( wc_variation_attribute_name( $attribute ) );
931
  foreach ( $terms as $term ) {
932
+ if ( in_array( $term->slug, $options, true ) ) {
933
+
934
+ $option = esc_html( apply_filters( 'woocommerce_variation_option_name', $term->name, $term, $attribute, $product ) );
935
 
936
  $is_selected = ( sanitize_title( $args[ 'selected' ] ) == $term->slug );
937
 
938
  $selected_class = $is_selected ? 'selected' : '';
939
+ $tooltip = trim( apply_filters( 'wvs_variable_item_tooltip', $option, $term, $args ) );
940
 
941
  if ( $is_archive && ! $show_archive_tooltip ) {
942
  $tooltip = false;
956
  $type = 'button';
957
  }
958
 
959
+ $data .= sprintf( '<li %1$s class="variable-item %2$s-variable-item %2$s-variable-item-%3$s %4$s" title="%5$s" data-title="%5$s" data-value="%3$s" role="radio" tabindex="0">', $screen_reader_html_attr . $tooltip_html_attr, esc_attr( $type ), esc_attr( $term->slug ), esc_attr( $selected_class ), $option );
960
 
961
  switch ( $type ):
962
 
965
  $image_size = sanitize_text_field( woo_variation_swatches()->get_option( 'attribute_image_size' ) );
966
  $image = wp_get_attachment_image_src( $attachment_id, apply_filters( 'wvs_product_attribute_image_size', $image_size ) );
967
  // $image_html = wp_get_attachment_image( $attachment_id, apply_filters( 'wvs_product_attribute_image_size', $image_size ), false, array( 'class' => '' ) );
968
+ $data .= sprintf( '<img aria-hidden="true" alt="%s" src="%s" width="%d" height="%d" />', $option, esc_url( $image[ 0 ] ), $image[ 1 ], $image[ 2 ] );
969
  // $data .= $image_html;
970
  break;
971
 
972
 
973
  case 'button':
974
+ $data .= sprintf( '<span class="variable-item-span variable-item-span-%s">%s</span>', esc_attr( $type ), $option );
975
  break;
976
 
977
  default:
991
  $is_selected = ( sanitize_title( $option ) == sanitize_title( $args[ 'selected' ] ) );
992
 
993
  $selected_class = $is_selected ? 'selected' : '';
994
+ $tooltip = trim( apply_filters( 'wvs_variable_item_tooltip', $option, $options, $args ) );
995
 
996
 
997
  if ( $is_archive && ! $show_archive_tooltip ) {
1092
  $terms = wc_get_product_terms( $product->get_id(), $attribute, array( 'fields' => 'all' ) );
1093
 
1094
  foreach ( $terms as $term ) {
1095
+ if ( in_array( $term->slug, $options, true ) ) {
1096
+ echo '<option value="' . esc_attr( $term->slug ) . '" ' . selected( sanitize_title( $args[ 'selected' ] ), $term->slug, false ) . '>' . apply_filters( 'woocommerce_variation_option_name', $term->name, $term, $attribute, $product ) . '</option>';
1097
  }
1098
  }
1099
  } else {
1100
  foreach ( $options as $option ) {
1101
  // This handles < 2.4.0 bw compatibility where text attributes were not sanitized.
1102
  $selected = sanitize_title( $args[ 'selected' ] ) === $args[ 'selected' ] ? selected( $args[ 'selected' ], sanitize_title( $option ), false ) : selected( $args[ 'selected' ], $option, false );
1103
+ echo '<option value="' . esc_attr( $option ) . '" ' . $selected . '>' . esc_html( apply_filters( 'woocommerce_variation_option_name', $option, null, $attribute, $product ) ) . '</option>';
1104
  }
1105
  }
1106
  }
1166
  $terms = wc_get_product_terms( $product->get_id(), $attribute, array( 'fields' => 'all' ) );
1167
 
1168
  foreach ( $terms as $term ) {
1169
+ if ( in_array( $term->slug, $options, true ) ) {
1170
+ echo '<option value="' . esc_attr( $term->slug ) . '" ' . selected( sanitize_title( $args[ 'selected' ] ), $term->slug, false ) . '>' . apply_filters( 'woocommerce_variation_option_name', $term->name, $term, $attribute, $product ) . '</option>';
1171
  }
1172
  }
1173
  } else {
1174
  foreach ( $options as $option ) {
1175
  // This handles < 2.4.0 bw compatibility where text attributes were not sanitized.
1176
  $selected = sanitize_title( $args[ 'selected' ] ) === $args[ 'selected' ] ? selected( $args[ 'selected' ], sanitize_title( $option ), false ) : selected( $args[ 'selected' ], $option, false );
1177
+ echo '<option value="' . esc_attr( $option ) . '" ' . $selected . '>' . esc_html( apply_filters( 'woocommerce_variation_option_name', $option, null, $attribute, $product ) ) . '</option>';
1178
  }
1179
  }
1180
  }
1237
  $terms = wc_get_product_terms( $product->get_id(), $attribute, array( 'fields' => 'all' ) );
1238
 
1239
  foreach ( $terms as $term ) {
1240
+ if ( in_array( $term->slug, $options, true ) ) {
1241
+ echo '<option value="' . esc_attr( $term->slug ) . '" ' . selected( sanitize_title( $args[ 'selected' ] ), $term->slug, false ) . '>' . apply_filters( 'woocommerce_variation_option_name', $term->name, $term, $attribute, $product ) . '</option>';
1242
  }
1243
  }
1244
  } else {
1245
  foreach ( $options as $option ) {
1246
  // This handles < 2.4.0 bw compatibility where text attributes were not sanitized.
1247
  $selected = sanitize_title( $args[ 'selected' ] ) === $args[ 'selected' ] ? selected( $args[ 'selected' ], sanitize_title( $option ), false ) : selected( $args[ 'selected' ], $option, false );
1248
+ echo '<option value="' . esc_attr( $option ) . '" ' . $selected . '>' . esc_html( apply_filters( 'woocommerce_variation_option_name', $option, null, $attribute, $product ) ) . '</option>';
1249
  }
1250
  }
1251
  }
1258
  }
1259
  endif;
1260
 
1261
+ // Default Button Variation Attribute Options
 
1262
  if ( ! function_exists( 'wvs_default_button_variation_attribute_options' ) ) :
1263
  function wvs_default_button_variation_attribute_options( $args = array() ) {
1264
 
1305
  $terms = wc_get_product_terms( $product->get_id(), $attribute, array( 'fields' => 'all' ) );
1306
 
1307
  foreach ( $terms as $term ) {
1308
+ if ( in_array( $term->slug, $options, true ) ) {
1309
+ echo '<option value="' . esc_attr( $term->slug ) . '" ' . selected( sanitize_title( $args[ 'selected' ] ), $term->slug, false ) . '>' . esc_html( apply_filters( 'woocommerce_variation_option_name', $term->name, $term, $attribute, $product ) ) . '</option>';
1310
  }
1311
  }
1312
  } else {
1313
  foreach ( $options as $option ) {
1314
  // This handles < 2.4.0 bw compatibility where text attributes were not sanitized.
1315
  $selected = sanitize_title( $args[ 'selected' ] ) === $args[ 'selected' ] ? selected( $args[ 'selected' ], sanitize_title( $option ), false ) : selected( $args[ 'selected' ], $option, false );
1316
+ echo '<option value="' . esc_attr( $option ) . '" ' . $selected . '>' . esc_html( apply_filters( 'woocommerce_variation_option_name', $option, null, $attribute, $product ) ) . '</option>';
1317
  }
1318
  }
1319
  }
1326
  }
1327
  endif;
1328
 
1329
+ // Default Image Variation Attribute Options
1330
  if ( ! function_exists( 'wvs_default_image_variation_attribute_options' ) ) :
1331
  function wvs_default_image_variation_attribute_options( $args = array() ) {
1332
 
1378
  $terms = wc_get_product_terms( $product->get_id(), $attribute, array( 'fields' => 'all' ) );
1379
 
1380
  foreach ( $terms as $term ) {
1381
+ if ( in_array( $term->slug, $options, true ) ) {
1382
+ echo '<option value="' . esc_attr( $term->slug ) . '" ' . selected( sanitize_title( $args[ 'selected' ] ), $term->slug, false ) . '>' . esc_html( apply_filters( 'woocommerce_variation_option_name', $term->name, $term, $attribute, $product ) ) . '</option>';
1383
  }
1384
  }
1385
  } else {
1386
  foreach ( $options as $option ) {
1387
  // This handles < 2.4.0 bw compatibility where text attributes were not sanitized.
1388
  $selected = sanitize_title( $args[ 'selected' ] ) === $args[ 'selected' ] ? selected( $args[ 'selected' ], sanitize_title( $option ), false ) : selected( $args[ 'selected' ], $option, false );
1389
+ echo '<option value="' . esc_attr( $option ) . '" ' . $selected . '>' . esc_html( apply_filters( 'woocommerce_variation_option_name', $option, null, $attribute, $product ) ) . '</option>';
1390
  }
1391
  }
1392
  }
1453
  $terms = wc_get_product_terms( $product->get_id(), $attribute, array( 'fields' => 'all' ) );
1454
 
1455
  foreach ( $terms as $term ) {
1456
+ if ( in_array( $term->slug, $options, true ) ) {
1457
+ echo '<option value="' . esc_attr( $term->slug ) . '" ' . selected( sanitize_title( $args[ 'selected' ] ), $term->slug, false ) . '>' . esc_html( apply_filters( 'woocommerce_variation_option_name', $term->name, $term, $attribute, $product ) ) . '</option>';
1458
  }
1459
  }
1460
  } else {
1461
  foreach ( $options as $option ) {
1462
  // This handles < 2.4.0 bw compatibility where text attributes were not sanitized.
1463
  $selected = sanitize_title( $args[ 'selected' ] ) === $args[ 'selected' ] ? selected( $args[ 'selected' ], sanitize_title( $option ), false ) : selected( $args[ 'selected' ], $option, false );
1464
+ echo '<option value="' . esc_attr( $option ) . '" ' . $selected . '>' . esc_html( apply_filters( 'woocommerce_variation_option_name', $option, null, $attribute, $product ) ) . '</option>';
1465
  }
1466
  }
1467
  }
1485
  return $html;
1486
  }
1487
 
 
 
1488
  // WooCommerce Product Bundle Fixing
1489
  if ( isset( $_POST[ 'action' ] ) && $_POST[ 'action' ] === 'woocommerce_configure_bundle_order_item' ) {
1490
  return $html;
1494
  // $attribute_id = sanitize_title( $args[ 'attribute' ] );
1495
  $product_id = $args[ 'product' ]->get_id();
1496
 
1497
+ $transient_type = ( isset( $args[ 'is_archive' ] ) && $args[ 'is_archive' ] ) ? ( "archive_" . $product_id . "_" . $attribute_id ) : ( $product_id . "_" . $attribute_id );
1498
+ $transient_name = 'wvs_attribute_html_' . $transient_type . $args[ 'selected' ];
1499
+
1500
+ $cache = new Woo_Variation_Swatches_Cache( $transient_name, 'wvs_variation_options_html' );
1501
 
1502
+ // $archive_transient_name = 'wvs_attribute_html_archive_' . $product_id . "_" . $attribute_id;
1503
+ // $product_transient_name = 'wvs_attribute_html_' . $product_id . "_" . $attribute_id;
1504
 
1505
+ $use_transient = (bool) woo_variation_swatches()->get_option( 'use_transient' );
 
 
1506
 
1507
+ // Clear cache
1508
  if ( isset( $_GET[ 'wvs_clear_transient' ] ) ) {
1509
+ $cache->delete_transient();
 
 
1510
  }
 
 
 
 
 
1511
 
1512
+ // Return cache
1513
  if ( ! isset( $_GET[ 'wvs_clear_transient' ] ) && $use_transient ) {
1514
+ $transient_html = $cache->get_transient( $transient_name );
1515
  if ( ! empty( $transient_html ) ) {
1516
  return $transient_html;
1517
  }
1644
 
1645
  $html = apply_filters( 'wvs_variation_attribute_options_html', $data, $args, $is_default_to_image, $is_default_to_button );
1646
 
1647
+ // Set cache
1648
  if ( ! isset( $_GET[ 'wvs_clear_transient' ] ) && $use_transient ) {
1649
+ $cache->set_transient( $html, HOUR_IN_SECONDS );
1650
  }
1651
 
1652
  return $html;
includes/hooks.php CHANGED
@@ -49,10 +49,14 @@
49
  }
50
 
51
 
52
- function wvs_save_product_variation_transient( $variation_id ) {
53
  $product = wc_get_product( $variation_id );
54
 
55
- if ( $product && $product->is_type( 'variable' ) ) {
 
 
 
 
56
 
57
  $product_id = $product->get_parent_id();
58
  $attribute_keys = array_keys( $product->get_variation_attributes() );
@@ -63,19 +67,27 @@
63
  delete_transient( $archive_transient_name );
64
  delete_transient( $product_transient_name );
65
  }
66
- }
67
  }
68
 
 
 
 
69
 
70
- add_action( 'woocommerce_save_product_variation', 'wvs_save_product_variation_transient' );
71
 
72
- add_action( 'woocommerce_update_product_variation', 'wvs_save_product_variation_transient' );
73
 
 
74
  add_action( 'woocommerce_delete_product_transients', function ( $product_id ) {
75
 
76
  $product = wc_get_product( $product_id );
77
 
78
- if ( $product && $product->is_type( 'variable' ) ) {
 
 
 
 
79
  $attribute_keys = array_keys( $product->get_variation_attributes() );
80
 
81
  foreach ( $attribute_keys as $attribute_id ) {
@@ -84,28 +96,110 @@
84
  delete_transient( $archive_transient_name );
85
  delete_transient( $product_transient_name );
86
  }
87
- }
88
  } );
89
 
90
  // Clean transient
91
  add_action( 'woocommerce_attribute_updated', function ( $attribute_id, $attribute, $old_attribute_name ) {
92
- $transient = sprintf( 'wvs_get_wc_attribute_taxonomy_%s', wc_attribute_taxonomy_name( $attribute[ 'attribute_name' ] ) );
93
  $old_transient = sprintf( 'wvs_get_wc_attribute_taxonomy_%s', wc_attribute_taxonomy_name( $old_attribute_name ) );
94
  delete_transient( $transient );
95
- delete_transient( $old_transient );
 
 
 
96
  }, 20, 3 );
97
 
98
  // Clean transient
99
  add_action( 'woocommerce_attribute_deleted', function ( $attribute_id, $attribute_name, $taxonomy ) {
100
- $transient = sprintf( 'wvs_get_wc_attribute_taxonomy_%s', $taxonomy );
101
- delete_transient( $transient );
 
 
102
  }, 20, 3 );
103
 
104
  // Clean transient
105
  add_action( 'woocommerce_attribute_added', function ( $attribute_id, $attribute ) {
106
- $transient = sprintf( 'wvs_get_wc_attribute_taxonomy_%s', wc_attribute_taxonomy_name( $attribute[ 'attribute_name' ] ) );
107
- delete_transient( $transient );
 
 
108
  }, 20, 2 );
109
 
110
  // Load Template
111
  // add_filter( 'woocommerce_locate_template', 'wvs_locate_template', 10, 3 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  }
50
 
51
 
52
+ function wvs_clear_product_variation_transient( $variation_id ) {
53
  $product = wc_get_product( $variation_id );
54
 
55
+ // Increments the transient version to invalidate cache.
56
+ WC_Cache_Helper::get_transient_version( 'wvs_variation_options_html', true );
57
+ WC_Cache_Helper::get_transient_version( 'wvs_attribute_taxonomy', true );
58
+
59
+ /*if ( $product && $product->is_type( 'variable' ) ) {
60
 
61
  $product_id = $product->get_parent_id();
62
  $attribute_keys = array_keys( $product->get_variation_attributes() );
67
  delete_transient( $archive_transient_name );
68
  delete_transient( $product_transient_name );
69
  }
70
+ }*/
71
  }
72
 
73
+ add_action( 'woocommerce_save_product_variation', 'wvs_clear_product_variation_transient' );
74
+
75
+ add_action( 'woocommerce_update_product_variation', 'wvs_clear_product_variation_transient' );
76
 
77
+ add_action( 'woocommerce_delete_product_variation', 'wvs_clear_product_variation_transient' );
78
 
79
+ add_action( 'woocommerce_trash_product_variation', 'wvs_clear_product_variation_transient' );
80
 
81
+ // WooCommerce -> Status -> Tools -> Clear transients
82
  add_action( 'woocommerce_delete_product_transients', function ( $product_id ) {
83
 
84
  $product = wc_get_product( $product_id );
85
 
86
+ WC_Cache_Helper::get_transient_version( 'wvs_variation_options_html', true );
87
+ WC_Cache_Helper::get_transient_version( 'wvs_attribute_taxonomy', true );
88
+
89
+
90
+ /*if ( $product && $product->is_type( 'variable' ) ) {
91
  $attribute_keys = array_keys( $product->get_variation_attributes() );
92
 
93
  foreach ( $attribute_keys as $attribute_id ) {
96
  delete_transient( $archive_transient_name );
97
  delete_transient( $product_transient_name );
98
  }
99
+ }*/
100
  } );
101
 
102
  // Clean transient
103
  add_action( 'woocommerce_attribute_updated', function ( $attribute_id, $attribute, $old_attribute_name ) {
104
+ /*$transient = sprintf( 'wvs_get_wc_attribute_taxonomy_%s', wc_attribute_taxonomy_name( $attribute[ 'attribute_name' ] ) );
105
  $old_transient = sprintf( 'wvs_get_wc_attribute_taxonomy_%s', wc_attribute_taxonomy_name( $old_attribute_name ) );
106
  delete_transient( $transient );
107
+ delete_transient( $old_transient );*/
108
+
109
+ WC_Cache_Helper::get_transient_version( 'wvs_attribute_taxonomy', true );
110
+
111
  }, 20, 3 );
112
 
113
  // Clean transient
114
  add_action( 'woocommerce_attribute_deleted', function ( $attribute_id, $attribute_name, $taxonomy ) {
115
+ /*$transient = sprintf( 'wvs_get_wc_attribute_taxonomy_%s', $taxonomy );
116
+ delete_transient( $transient );*/
117
+
118
+ WC_Cache_Helper::get_transient_version( 'wvs_attribute_taxonomy', true );
119
  }, 20, 3 );
120
 
121
  // Clean transient
122
  add_action( 'woocommerce_attribute_added', function ( $attribute_id, $attribute ) {
123
+ /*$transient = sprintf( 'wvs_get_wc_attribute_taxonomy_%s', wc_attribute_taxonomy_name( $attribute[ 'attribute_name' ] ) );
124
+ delete_transient( $transient );*/
125
+
126
+ WC_Cache_Helper::get_transient_version( 'wvs_attribute_taxonomy', true );
127
  }, 20, 2 );
128
 
129
  // Load Template
130
  // add_filter( 'woocommerce_locate_template', 'wvs_locate_template', 10, 3 );
131
+
132
+ add_filter( 'disable_wvs_admin_enqueue_scripts', function ( $default ) {
133
+ return is_customize_preview() ? is_customize_preview() : $default;
134
+ } );
135
+
136
+
137
+ // Gallery Install Notice
138
+ add_action( 'woocommerce_product_after_variable_attributes', function ( $loop, $variation_data, $variation ) {
139
+ if ( ! woo_variation_swatches()->is_gallery_active() && current_user_can( 'install_plugins' ) && apply_filters( 'wvs_install_woo_variation_gallery_notice', true ) ) {
140
+ ?>
141
+ <div class="form-row form-row-full woo-variation-gallery-message"
142
+ data-nonce="<?php echo wp_create_nonce( 'install-woo-variation-gallery' ) ?>"
143
+ data-installing="<?php esc_attr_e( 'Installing Plugin...', 'woo-variation-swatches' ); ?>"
144
+ data-activated="<?php esc_attr_e( 'Plugin Installed. Please refresh this page.', 'woo-variation-swatches' ); ?>">
145
+ <?php printf( '%s <a class="install-woo-variation-gallery-action" target="_blank" href="#">%s</a> plugin', esc_html__( 'Want to add more image? Install', 'woo-variation-swatches' ), esc_html__( 'Additional Variation Images Gallery for WooCommerce', 'woo-variation-swatches' ) ) ?>
146
+ </div>
147
+ <?php
148
+ }
149
+ }, 10, 3 );
150
+
151
+ add_action( 'wp_ajax_install_woo_variation_gallery', function () {
152
+
153
+ if ( is_ajax() && current_user_can( 'install_plugins' ) && wp_verify_nonce( $_POST[ 'nonce' ], 'install-woo-variation-gallery' ) ) {
154
+
155
+ $plugin_slug = 'woo-variation-gallery/woo-variation-gallery.php';
156
+ $plugin_zip = 'https://downloads.wordpress.org/plugin/woo-variation-gallery.zip';
157
+
158
+ if ( wvs_is_plugin_installed( $plugin_slug ) ) {
159
+ $installed = true;
160
+ wvs_upgrade_plugin( $plugin_slug );
161
+ } else {
162
+ $installed = wvs_install_plugin( $plugin_zip );
163
+ }
164
+
165
+ if ( ! is_wp_error( $installed ) && $installed ) {
166
+ activate_plugin( $plugin_slug );
167
+ }
168
+ }
169
+
170
+ die;
171
+ } );
172
+
173
+ function wvs_is_plugin_installed( $slug ) {
174
+ if ( ! function_exists( 'get_plugins' ) ) {
175
+ require_once ABSPATH . 'wp-admin/includes/plugin.php';
176
+ }
177
+ $all_plugins = get_plugins();
178
+
179
+ if ( ! empty( $all_plugins[ $slug ] ) ) {
180
+ return true;
181
+ } else {
182
+ return false;
183
+ }
184
+ }
185
+
186
+ function wvs_install_plugin( $plugin_zip ) {
187
+ include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
188
+ wp_cache_flush();
189
+
190
+ $upgrader = new Plugin_Upgrader();
191
+ $installed = $upgrader->install( $plugin_zip );
192
+
193
+ return $installed;
194
+ }
195
+
196
+ function wvs_upgrade_plugin( $plugin_slug ) {
197
+ include_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
198
+ wp_cache_flush();
199
+
200
+ $upgrader = new Plugin_Upgrader();
201
+ $upgraded = $upgrader->upgrade( $plugin_slug );
202
+
203
+ return $upgraded;
204
+ }
205
+
languages/woo-variation-swatches.pot CHANGED
@@ -36,19 +36,19 @@ msgstr ""
36
  msgid "Settings"
37
  msgstr ""
38
 
39
- #: ../includes/class-wvs-settings-api.php:538
40
  msgid "Save Changes"
41
  msgstr ""
42
 
43
- #: ../includes/class-wvs-settings-api.php:539
44
  msgid "Are you sure to reset current settings?"
45
  msgstr ""
46
 
47
- #: ../includes/class-wvs-settings-api.php:539
48
  msgid "Reset all"
49
  msgstr ""
50
 
51
- #: ../includes/class-wvs-settings-api.php:688
52
  msgid "NEW"
53
  msgstr ""
54
 
@@ -308,7 +308,7 @@ msgstr ""
308
  msgid "Choose a color"
309
  msgstr ""
310
 
311
- #: ../includes/functions.php:471, ../woo-variation-swatches.php:412
312
  msgid "Choose an Image"
313
  msgstr ""
314
 
@@ -332,166 +332,182 @@ msgstr ""
332
  msgid "Add new %s"
333
  msgstr ""
334
 
335
- #: ../includes/functions.php:1056, ../includes/functions.php:1128, ../includes/functions.php:1201, ../includes/functions.php:1271, ../includes/functions.php:1339, ../includes/functions.php:1418
336
  msgid "Choose an option"
337
  msgstr ""
338
 
339
- #: ../woo-variation-swatches.php:140
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
340
  msgid "It's a temporary deactivation."
341
  msgstr ""
342
 
343
- #: ../woo-variation-swatches.php:145
344
  msgid "I couldn't understand how to make it work."
345
  msgstr ""
346
 
347
- #: ../woo-variation-swatches.php:147
348
  msgid "It converts variation select box to beautiful swatches. <br> <a target=\"_blank\" href=\"https://bit.ly/deactivate-dialogue\">Please check live demo</a>."
349
  msgstr ""
350
 
351
- #: ../woo-variation-swatches.php:151
352
  msgid "I no longer need the plugin"
353
  msgstr ""
354
 
355
- #: ../woo-variation-swatches.php:156
356
  msgid "I found a better plugin"
357
  msgstr ""
358
 
359
- #: ../woo-variation-swatches.php:157
360
  msgid "Please share which plugin"
361
  msgstr ""
362
 
363
- #: ../woo-variation-swatches.php:161
364
  msgid "The plugin <strong>broke my layout</strong> or some functionality."
365
  msgstr ""
366
 
367
- #: ../woo-variation-swatches.php:163
368
  msgid "<a target=\"_blank\" href=\"https://getwooplugins.com/tickets/\">Please open a support ticket</a>, we will fix it immediately."
369
  msgstr ""
370
 
371
- #: ../woo-variation-swatches.php:167
372
  msgid "I need someone to <strong>setup this plugin.</strong>"
373
  msgstr ""
374
 
375
- #: ../woo-variation-swatches.php:168
376
  msgid "Your email address."
377
  msgstr ""
378
 
379
- #: ../woo-variation-swatches.php:170
380
  msgid "Please provide your email address to contact with you <br>and help you to setup and configure this plugin."
381
  msgstr ""
382
 
383
- #: ../woo-variation-swatches.php:174
384
  msgid "The plugin is <strong>too complicated to configure.</strong>"
385
  msgstr ""
386
 
387
- #: ../woo-variation-swatches.php:176
388
  msgid "<a target=\"_blank\" href=\"https://getwooplugins.com/documentation/woocommerce-variation-swatches/\">Have you checked our documentation?</a>."
389
  msgstr ""
390
 
391
- #: ../woo-variation-swatches.php:180
392
  msgid "I need <strong>specific feature</strong> that you don't support."
393
  msgstr ""
394
 
395
- #: ../woo-variation-swatches.php:181
396
  msgid "Please share with us."
397
  msgstr ""
398
 
399
- #: ../woo-variation-swatches.php:186
400
  msgid "Other"
401
  msgstr ""
402
 
403
- #: ../woo-variation-swatches.php:187
404
  msgid "Please share the reason"
405
  msgstr ""
406
 
407
- #: ../woo-variation-swatches.php:389
408
  msgid "Clear"
409
  msgstr ""
410
 
411
- #: ../woo-variation-swatches.php:390
412
  msgid "Clear color"
413
  msgstr ""
414
 
415
- #: ../woo-variation-swatches.php:391
416
  msgid "Default"
417
  msgstr ""
418
 
419
- #: ../woo-variation-swatches.php:392
420
  msgid "Select default color"
421
  msgstr ""
422
 
423
- #: ../woo-variation-swatches.php:393
424
  msgid "Select Color"
425
  msgstr ""
426
 
427
- #: ../woo-variation-swatches.php:394
428
  msgid "Color value"
429
  msgstr ""
430
 
431
- #: ../woo-variation-swatches.php:413
432
  msgid "Add Attribute"
433
  msgstr ""
434
 
435
- #: ../woo-variation-swatches.php:414
436
  msgid "Add"
437
  msgstr ""
438
 
439
- #: ../woo-variation-swatches.php:415
440
  msgid "Cancel"
441
  msgstr ""
442
 
443
- #: ../woo-variation-swatches.php:416
444
  msgid "Use Image"
445
  msgstr ""
446
 
447
- #: ../woo-variation-swatches.php:417
448
  msgid "Add Media"
449
  msgstr ""
450
 
451
- #: ../woo-variation-swatches.php:508, ../woo-variation-swatches.php:508
452
  msgid "Read Documentation"
453
  msgstr ""
454
 
455
- #: ../woo-variation-swatches.php:510
456
  msgid "Facing issue?"
457
  msgstr ""
458
 
459
- #: ../woo-variation-swatches.php:510
460
  msgid "Please open a ticket."
461
  msgstr ""
462
 
463
- #: ../woo-variation-swatches.php:525
464
  msgid "Go Pro"
465
  msgstr ""
466
 
467
- #: ../woo-variation-swatches.php:578
468
  msgid "Please check PHP version requirement."
469
  msgstr ""
470
 
471
- #: ../woo-variation-swatches.php:580
472
  msgid "It's required to use latest version of PHP to use <strong>Variation Swatches for WooCommerce</strong>."
473
  msgstr ""
474
 
475
- #: ../woo-variation-swatches.php:592
476
  msgid "WooCommerce"
477
  msgstr ""
478
 
479
- #: ../woo-variation-swatches.php:600
480
  msgid "<strong>Variation Swatches for WooCommerce</strong> is an add-on of "
481
  msgstr ""
482
 
483
- #: ../woo-variation-swatches.php:613
484
  msgid "Currently, you are using older version of WooCommerce. It's recommended to use latest version of WooCommerce to work with %s."
485
  msgstr ""
486
 
487
- #: ../woo-variation-swatches.php:613
488
  msgid "Variation Swatches for WooCommerce"
489
  msgstr ""
490
 
491
- #: ../woo-variation-swatches.php:708
492
  msgid "Variation Swatches for WooCommerce Plugin try to load \"%s\" but template \"%s\" was not found."
493
  msgstr ""
494
 
495
- #: ../woo-variation-swatches.php:927
496
  msgid "Install Now"
497
  msgstr ""
36
  msgid "Settings"
37
  msgstr ""
38
 
39
+ #: ../includes/class-wvs-settings-api.php:542
40
  msgid "Save Changes"
41
  msgstr ""
42
 
43
+ #: ../includes/class-wvs-settings-api.php:543
44
  msgid "Are you sure to reset current settings?"
45
  msgstr ""
46
 
47
+ #: ../includes/class-wvs-settings-api.php:543
48
  msgid "Reset all"
49
  msgstr ""
50
 
51
+ #: ../includes/class-wvs-settings-api.php:692
52
  msgid "NEW"
53
  msgstr ""
54
 
308
  msgid "Choose a color"
309
  msgstr ""
310
 
311
+ #: ../includes/functions.php:471, ../woo-variation-swatches.php:438
312
  msgid "Choose an Image"
313
  msgstr ""
314
 
332
  msgid "Add new %s"
333
  msgstr ""
334
 
335
+ #: ../includes/functions.php:1061, ../includes/functions.php:1133, ../includes/functions.php:1206, ../includes/functions.php:1275, ../includes/functions.php:1343, ../includes/functions.php:1422
336
  msgid "Choose an option"
337
  msgstr ""
338
 
339
+ #: ../includes/hooks.php:143
340
+ msgid "Installing Plugin..."
341
+ msgstr ""
342
+
343
+ #: ../includes/hooks.php:144
344
+ msgid "Plugin Installed. Please refresh this page."
345
+ msgstr ""
346
+
347
+ #: ../includes/hooks.php:145
348
+ msgid "Want to add more image? Install"
349
+ msgstr ""
350
+
351
+ #: ../includes/hooks.php:145
352
+ msgid "Additional Variation Images Gallery for WooCommerce"
353
+ msgstr ""
354
+
355
+ #: ../woo-variation-swatches.php:141
356
  msgid "It's a temporary deactivation."
357
  msgstr ""
358
 
359
+ #: ../woo-variation-swatches.php:146
360
  msgid "I couldn't understand how to make it work."
361
  msgstr ""
362
 
363
+ #: ../woo-variation-swatches.php:148
364
  msgid "It converts variation select box to beautiful swatches. <br> <a target=\"_blank\" href=\"https://bit.ly/deactivate-dialogue\">Please check live demo</a>."
365
  msgstr ""
366
 
367
+ #: ../woo-variation-swatches.php:152
368
  msgid "I no longer need the plugin"
369
  msgstr ""
370
 
371
+ #: ../woo-variation-swatches.php:157
372
  msgid "I found a better plugin"
373
  msgstr ""
374
 
375
+ #: ../woo-variation-swatches.php:158
376
  msgid "Please share which plugin"
377
  msgstr ""
378
 
379
+ #: ../woo-variation-swatches.php:162
380
  msgid "The plugin <strong>broke my layout</strong> or some functionality."
381
  msgstr ""
382
 
383
+ #: ../woo-variation-swatches.php:164
384
  msgid "<a target=\"_blank\" href=\"https://getwooplugins.com/tickets/\">Please open a support ticket</a>, we will fix it immediately."
385
  msgstr ""
386
 
387
+ #: ../woo-variation-swatches.php:168
388
  msgid "I need someone to <strong>setup this plugin.</strong>"
389
  msgstr ""
390
 
391
+ #: ../woo-variation-swatches.php:169
392
  msgid "Your email address."
393
  msgstr ""
394
 
395
+ #: ../woo-variation-swatches.php:171
396
  msgid "Please provide your email address to contact with you <br>and help you to setup and configure this plugin."
397
  msgstr ""
398
 
399
+ #: ../woo-variation-swatches.php:175
400
  msgid "The plugin is <strong>too complicated to configure.</strong>"
401
  msgstr ""
402
 
403
+ #: ../woo-variation-swatches.php:177
404
  msgid "<a target=\"_blank\" href=\"https://getwooplugins.com/documentation/woocommerce-variation-swatches/\">Have you checked our documentation?</a>."
405
  msgstr ""
406
 
407
+ #: ../woo-variation-swatches.php:181
408
  msgid "I need <strong>specific feature</strong> that you don't support."
409
  msgstr ""
410
 
411
+ #: ../woo-variation-swatches.php:182
412
  msgid "Please share with us."
413
  msgstr ""
414
 
415
+ #: ../woo-variation-swatches.php:187
416
  msgid "Other"
417
  msgstr ""
418
 
419
+ #: ../woo-variation-swatches.php:188
420
  msgid "Please share the reason"
421
  msgstr ""
422
 
423
+ #: ../woo-variation-swatches.php:415
424
  msgid "Clear"
425
  msgstr ""
426
 
427
+ #: ../woo-variation-swatches.php:416
428
  msgid "Clear color"
429
  msgstr ""
430
 
431
+ #: ../woo-variation-swatches.php:417
432
  msgid "Default"
433
  msgstr ""
434
 
435
+ #: ../woo-variation-swatches.php:418
436
  msgid "Select default color"
437
  msgstr ""
438
 
439
+ #: ../woo-variation-swatches.php:419
440
  msgid "Select Color"
441
  msgstr ""
442
 
443
+ #: ../woo-variation-swatches.php:420
444
  msgid "Color value"
445
  msgstr ""
446
 
447
+ #: ../woo-variation-swatches.php:439
448
  msgid "Add Attribute"
449
  msgstr ""
450
 
451
+ #: ../woo-variation-swatches.php:440
452
  msgid "Add"
453
  msgstr ""
454
 
455
+ #: ../woo-variation-swatches.php:441
456
  msgid "Cancel"
457
  msgstr ""
458
 
459
+ #: ../woo-variation-swatches.php:442
460
  msgid "Use Image"
461
  msgstr ""
462
 
463
+ #: ../woo-variation-swatches.php:443
464
  msgid "Add Media"
465
  msgstr ""
466
 
467
+ #: ../woo-variation-swatches.php:542, ../woo-variation-swatches.php:542
468
  msgid "Read Documentation"
469
  msgstr ""
470
 
471
+ #: ../woo-variation-swatches.php:544
472
  msgid "Facing issue?"
473
  msgstr ""
474
 
475
+ #: ../woo-variation-swatches.php:544
476
  msgid "Please open a ticket."
477
  msgstr ""
478
 
479
+ #: ../woo-variation-swatches.php:559
480
  msgid "Go Pro"
481
  msgstr ""
482
 
483
+ #: ../woo-variation-swatches.php:612
484
  msgid "Please check PHP version requirement."
485
  msgstr ""
486
 
487
+ #: ../woo-variation-swatches.php:614
488
  msgid "It's required to use latest version of PHP to use <strong>Variation Swatches for WooCommerce</strong>."
489
  msgstr ""
490
 
491
+ #: ../woo-variation-swatches.php:626
492
  msgid "WooCommerce"
493
  msgstr ""
494
 
495
+ #: ../woo-variation-swatches.php:634
496
  msgid "<strong>Variation Swatches for WooCommerce</strong> is an add-on of "
497
  msgstr ""
498
 
499
+ #: ../woo-variation-swatches.php:647
500
  msgid "Currently, you are using older version of WooCommerce. It's recommended to use latest version of WooCommerce to work with %s."
501
  msgstr ""
502
 
503
+ #: ../woo-variation-swatches.php:647
504
  msgid "Variation Swatches for WooCommerce"
505
  msgstr ""
506
 
507
+ #: ../woo-variation-swatches.php:742
508
  msgid "Variation Swatches for WooCommerce Plugin try to load \"%s\" but template \"%s\" was not found."
509
  msgstr ""
510
 
511
+ #: ../woo-variation-swatches.php:961
512
  msgid "Install Now"
513
  msgstr ""
package.json CHANGED
@@ -1,7 +1,7 @@
1
  {
2
  "package": "Variation Swatches for WooCommerce",
3
  "name": "woo-variation-swatches",
4
- "version": "1.1.1",
5
  "author": "Emran Ahmed <emran.bd.08@gmail.com>",
6
  "contact": "emran.bd.08@gmail.com",
7
  "license": "GNU General Public License v3",
1
  {
2
  "package": "Variation Swatches for WooCommerce",
3
  "name": "woo-variation-swatches",
4
+ "version": "1.1.2",
5
  "author": "Emran Ahmed <emran.bd.08@gmail.com>",
6
  "contact": "emran.bd.08@gmail.com",
7
  "license": "GNU General Public License v3",
webpack.mix.js CHANGED
@@ -61,7 +61,7 @@ if (Mix.inProduction()) {
61
  }
62
 
63
  mix.banner({
64
- banner : "Variation Swatches for WooCommerce v1.1.1 \n\nAuthor: Emran Ahmed ( emran.bd.08@gmail.com ) \nDate: " + new Date().toLocaleString() + "\nReleased under the GPLv3 license."
65
  });
66
 
67
  mix.notification({
61
  }
62
 
63
  mix.banner({
64
+ banner : "Variation Swatches for WooCommerce v1.1.2 \n\nAuthor: Emran Ahmed ( emran.bd.08@gmail.com ) \nDate: " + new Date().toLocaleString() + "\nReleased under the GPLv3 license."
65
  });
66
 
67
  mix.notification({
woo-variation-swatches.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin URI: https://wordpress.org/plugins/woo-variation-swatches/
5
  * Description: Beautiful colors, images and buttons variation swatches for woocommerce product attributes. Requires WooCommerce 3.2+
6
  * Author: Emran Ahmed
7
- * Version: 1.1.1
8
  * Domain Path: /languages
9
  * Requires at least: 4.8
10
  * Tested up to: 5.5
@@ -20,7 +20,7 @@
20
 
21
  final class Woo_Variation_Swatches {
22
 
23
- protected $_version = '1.1.1';
24
 
25
  protected static $_instance = null;
26
  private $_settings_api;
@@ -61,6 +61,7 @@
61
 
62
  public function includes() {
63
  if ( $this->is_required_php_version() ) {
 
64
  require_once $this->include_path( 'class-wvs-customizer.php' );
65
  require_once $this->include_path( 'class-wvs-settings-api.php' );
66
  require_once $this->include_path( 'class-wvs-term-meta.php' );
@@ -203,14 +204,14 @@
203
 
204
  public function deactivate_feedback() {
205
 
206
- $api_url = 'https://getwooplugins.com/wp-json/getwooplugins/v1/deactivation';
207
 
208
  $deactivate_reasons = $this->deactivate_feedback_reasons();
209
 
210
  $plugin = sanitize_title( $_POST[ 'plugin' ] );
211
  $reason_id = sanitize_title( $_POST[ 'reason_type' ] );
212
  $reason_title = $deactivate_reasons[ $reason_id ][ 'title' ];
213
- $reason_text = sanitize_text_field( $_POST[ 'reason_text' ] );
214
  $plugin_version = sanitize_text_field( $_POST[ 'version' ] );
215
 
216
  if ( 'temporary_deactivation' === $reason_id ) {
@@ -224,23 +225,33 @@
224
  'parent_theme' => $this->get_parent_theme_name(),
225
  'theme_name' => $this->get_theme_name(),
226
  'theme_version' => $this->get_theme_version(),
227
- 'theme_uri' => wp_get_theme( get_template() )->get( 'ThemeURI' ),
228
- 'theme_author' => wp_get_theme( get_template() )->get( 'Author' ),
229
- 'theme_author_uri' => wp_get_theme( get_template() )->get( 'AuthorURI' ),
230
  );
231
 
232
  $database_version = wc_get_server_database_version();
233
  $active_plugins = (array) get_option( 'active_plugins', array() );
 
234
 
235
  if ( is_multisite() ) {
236
  $network_activated_plugins = array_keys( get_site_option( 'active_sitewide_plugins', array() ) );
237
  $active_plugins = array_merge( $active_plugins, $network_activated_plugins );
238
  }
239
 
 
 
 
 
 
 
 
 
 
240
  $environment = array(
241
  'is_multisite' => is_multisite(),
242
- 'site_url' => get_option( 'siteurl' ),
243
- 'home_url' => get_option( 'home' ),
244
  'php_version' => phpversion(),
245
  'mysql_version' => $database_version[ 'number' ],
246
  'mysql_version_string' => $database_version[ 'string' ],
@@ -249,18 +260,28 @@
249
  'server_info' => isset( $_SERVER[ 'SERVER_SOFTWARE' ] ) ? wc_clean( wp_unslash( $_SERVER[ 'SERVER_SOFTWARE' ] ) ) : '',
250
  );
251
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
252
  $response = wp_remote_post( $api_url, $args = array(
253
  'sslverify' => false,
254
  'timeout' => 60,
255
- 'body' => array(
256
- 'plugin' => $plugin,
257
- 'version' => $plugin_version,
258
- 'reason_title' => $reason_title,
259
- 'reason_text' => $reason_text,
260
- 'theme' => $theme,
261
- 'plugins' => $active_plugins,
262
- 'environment' => $environment
263
- )
264
  ) );
265
 
266
  if ( ! is_wp_error( $response ) && wp_remote_retrieve_response_code( $response ) === 200 ) {
@@ -379,6 +400,11 @@
379
  /*wp_enqueue_script( 'jquery-ui-dialog' );
380
  wp_enqueue_style( 'wp-jquery-ui-dialog' );*/
381
 
 
 
 
 
 
382
  wp_enqueue_style( 'wp-color-picker' );
383
  wp_enqueue_script( 'wp-color-picker-alpha', $this->assets_uri( "/js/wp-color-picker-alpha{$suffix}.js" ), array( 'wp-color-picker' ), '2.1.3', true );
384
 
@@ -438,6 +464,10 @@
438
  return $this->_settings_api;
439
  }
440
 
 
 
 
 
441
  public function add_setting( $tab_id, $tab_title, $tab_sections, $active = false, $is_pro_tab = false, $is_new = false ) {
442
  // Example:
443
 
@@ -483,6 +513,10 @@
483
  return $this->_settings_api->get_option( $id );
484
  }
485
 
 
 
 
 
486
  public function add_term_meta( $taxonomy, $post_type, $fields ) {
487
  return new WVS_Term_Meta( $taxonomy, $post_type, $fields );
488
  }
4
  * Plugin URI: https://wordpress.org/plugins/woo-variation-swatches/
5
  * Description: Beautiful colors, images and buttons variation swatches for woocommerce product attributes. Requires WooCommerce 3.2+
6
  * Author: Emran Ahmed
7
+ * Version: 1.1.2
8
  * Domain Path: /languages
9
  * Requires at least: 4.8
10
  * Tested up to: 5.5
20
 
21
  final class Woo_Variation_Swatches {
22
 
23
+ protected $_version = '1.1.2';
24
 
25
  protected static $_instance = null;
26
  private $_settings_api;
61
 
62
  public function includes() {
63
  if ( $this->is_required_php_version() ) {
64
+ require_once $this->include_path( 'class-woo-variation-swatches-cache.php' );
65
  require_once $this->include_path( 'class-wvs-customizer.php' );
66
  require_once $this->include_path( 'class-wvs-settings-api.php' );
67
  require_once $this->include_path( 'class-wvs-term-meta.php' );
204
 
205
  public function deactivate_feedback() {
206
 
207
+ $api_url = 'https://stats.storepress.com/wp-json/storepress/deactivation';
208
 
209
  $deactivate_reasons = $this->deactivate_feedback_reasons();
210
 
211
  $plugin = sanitize_title( $_POST[ 'plugin' ] );
212
  $reason_id = sanitize_title( $_POST[ 'reason_type' ] );
213
  $reason_title = $deactivate_reasons[ $reason_id ][ 'title' ];
214
+ $reason_text = ( isset( $_POST[ 'reason_text' ] ) ? sanitize_text_field( $_POST[ 'reason_text' ] ) : '' );
215
  $plugin_version = sanitize_text_field( $_POST[ 'version' ] );
216
 
217
  if ( 'temporary_deactivation' === $reason_id ) {
225
  'parent_theme' => $this->get_parent_theme_name(),
226
  'theme_name' => $this->get_theme_name(),
227
  'theme_version' => $this->get_theme_version(),
228
+ 'theme_uri' => esc_url( wp_get_theme( get_template() )->get( 'ThemeURI' ) ),
229
+ 'theme_author' => esc_html( wp_get_theme( get_template() )->get( 'Author' ) ),
230
+ 'theme_author_uri' => esc_url( wp_get_theme( get_template() )->get( 'AuthorURI' ) ),
231
  );
232
 
233
  $database_version = wc_get_server_database_version();
234
  $active_plugins = (array) get_option( 'active_plugins', array() );
235
+ $plugins = array();
236
 
237
  if ( is_multisite() ) {
238
  $network_activated_plugins = array_keys( get_site_option( 'active_sitewide_plugins', array() ) );
239
  $active_plugins = array_merge( $active_plugins, $network_activated_plugins );
240
  }
241
 
242
+ foreach ( $active_plugins as $active_plugin ) {
243
+
244
+ if ( $active_plugin === 'woo-variation-swatches/woo-variation-swatches.php' ) {
245
+ continue;
246
+ }
247
+
248
+ $plugins[ $active_plugin ] = get_plugin_data( WP_PLUGIN_DIR . '/' . $active_plugin, false, false );
249
+ }
250
+
251
  $environment = array(
252
  'is_multisite' => is_multisite(),
253
+ 'site_url' => esc_url( get_option( 'siteurl' ) ),
254
+ 'home_url' => esc_url( get_option( 'home' ) ),
255
  'php_version' => phpversion(),
256
  'mysql_version' => $database_version[ 'number' ],
257
  'mysql_version_string' => $database_version[ 'string' ],
260
  'server_info' => isset( $_SERVER[ 'SERVER_SOFTWARE' ] ) ? wc_clean( wp_unslash( $_SERVER[ 'SERVER_SOFTWARE' ] ) ) : '',
261
  );
262
 
263
+ $request_body = array(
264
+ 'plugin' => $plugin,
265
+ 'version' => $plugin_version,
266
+ 'reason_id' => $reason_id,
267
+ 'reason_title' => $reason_title,
268
+ 'reason_text' => $reason_text,
269
+ 'settings' => $this->get_options(),
270
+ 'theme' => $theme,
271
+ 'plugins' => $plugins,
272
+ 'environment' => $environment
273
+ );
274
+
275
+ if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
276
+ $logger = wc_get_logger();
277
+ $context = array( 'source' => 'woo-variation-swatches' );
278
+ $logger->info( sprintf( 'Deactivate log: %s', print_r( $request_body, true ) ), $context );
279
+ }
280
+
281
  $response = wp_remote_post( $api_url, $args = array(
282
  'sslverify' => false,
283
  'timeout' => 60,
284
+ 'body' => $request_body
 
 
 
 
 
 
 
 
285
  ) );
286
 
287
  if ( ! is_wp_error( $response ) && wp_remote_retrieve_response_code( $response ) === 200 ) {
400
  /*wp_enqueue_script( 'jquery-ui-dialog' );
401
  wp_enqueue_style( 'wp-jquery-ui-dialog' );*/
402
 
403
+ // Filter for disable loading scripts
404
+ if ( apply_filters( 'disable_wvs_admin_enqueue_scripts', false ) ) {
405
+ return false;
406
+ }
407
+
408
  wp_enqueue_style( 'wp-color-picker' );
409
  wp_enqueue_script( 'wp-color-picker-alpha', $this->assets_uri( "/js/wp-color-picker-alpha{$suffix}.js" ), array( 'wp-color-picker' ), '2.1.3', true );
410
 
464
  return $this->_settings_api;
465
  }
466
 
467
+ function is_gallery_active() {
468
+ return class_exists( 'Woo_Variation_Gallery' );
469
+ }
470
+
471
  public function add_setting( $tab_id, $tab_title, $tab_sections, $active = false, $is_pro_tab = false, $is_new = false ) {
472
  // Example:
473
 
513
  return $this->_settings_api->get_option( $id );
514
  }
515
 
516
+ public function get_options() {
517
+ return get_option( 'woo_variation_swatches' );
518
+ }
519
+
520
  public function add_term_meta( $taxonomy, $post_type, $fields ) {
521
  return new WVS_Term_Meta( $taxonomy, $post_type, $fields );
522
  }