WooCommerce Variation Swatches - Version 1.0.11

Version Description

  • New Attribute create from product
  • Variation Preview color, image
  • Settings option also added on customizer
  • Fix: Any variation issue caused by outofstock variation
Download this release

Release Info

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

Code changes from version 1.0.10 to 1.0.11

README.txt CHANGED
@@ -1,5 +1,5 @@
1
=== WooCommerce Variation Swatches ===
2
- Contributors: EmranAhmed, wpeshaan
3
Tags: woocommerce variation, woocommerce, variation swatches, woocommerce attributes, product attributes, product color, product size, variable product attributes, variation product swatches, color variation swatch, image variation swatch
4
Requires at least: 4.8
5
Tested up to: 4.9
@@ -135,6 +135,13 @@ Just call this javascript function on ajax load event `$('.variations_form').tri
135
136
== Changelog ==
137
138
= 1.0.10 =
139
140
* Extendable hooks added to extend
1
=== WooCommerce Variation Swatches ===
2
+ Contributors: EmranAhmed, wpeshaan, getwooplugins
3
Tags: woocommerce variation, woocommerce, variation swatches, woocommerce attributes, product attributes, product color, product size, variable product attributes, variation product swatches, color variation swatch, image variation swatch
4
Requires at least: 4.8
5
Tested up to: 4.9
135
136
== Changelog ==
137
138
+ = 1.0.11 =
139
+
140
+ * New Attribute create from product
141
+ * Variation Preview color, image
142
+ * Settings option also added on customizer
143
+ * Fix: Any variation issue caused by outofstock variation
144
+
145
= 1.0.10 =
146
147
* Extendable hooks added to extend
assets/css/admin.css CHANGED
@@ -1,8 +1,8 @@
1
/*!
2
- * WooCommerce Variation Swatches v1.0.10
3
*
4
* Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
- * Date: 2018-2-22 21:58:19
6
* Released under the GPLv3 license.
7
*/
8
.button.button-danger {
@@ -72,5 +72,15 @@
72
fill: none;
73
}
74
75
76
- /*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXRzL2Nzcy9hZG1pbi5jc3MiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmM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QUNBO0FETkE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQ1FBO0FBQ0E7QURiQTs7QUFPQTtBQUNBO0FBQ0E7QUNVQTtBQUNBO0FEcEJBOztBQVdBO0FDYUE7QUFDQTtBRHpCQTs7OztBQWFBO0FDa0JBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9*/
1
/*!
2
+ * WooCommerce Variation Swatches v1.0.11
3
*
4
* Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
+ * Date: 2018-2-28 04:08:03
6
* Released under the GPLv3 license.
7
*/
8
.button.button-danger {
72
fill: none;
73
}
74
75
+ #wvs-meta-preview {
76
+ width: 30px;
77
+ }
78
+
79
+ .wvs-preview {
80
+ width: 30px;
81
+ height: 30px;
82
+ border: #000000 1px solid;
83
+ }
84
+
85
86
+ /*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXRzL2Nzcy9hZG1pbi5jc3MiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvc2Nzcy9zcmMvc2Nzcy9iYWNrZW5kLnNjc3MiLCJ3ZWJwYWNrOi8vLy4vYmFja2VuZC5zY3NzIiwid2VicGFjazovLy8uL3NyYy9zY3NzL2JhY2tlbmQuc2NzcyJdLCJzb3VyY2VzQ29udGVudCI6WyIuYnV0dG9uLmJ1dHRvbi1kYW5nZXIge1xuICBjb2xvciAgICAgICAgICAgIDogI0ZGRkZGRjtcbiAgYmFja2dyb3VuZC1jb2xvciA6ICNBRjJEMkI7XG4gIGJvcmRlci1jb2xvciAgICAgOiAjQTYyRDJCO1xuICBib3gtc2hhZG93ICAgICAgIDogMCAxcHggMCAjQTcyRDJCO1xuICB2ZXJ0aWNhbC1hbGlnbiAgIDogdG9wO1xuICAmOmhvdmVyLCAmOmZvY3VzLCAmOmFjdGl2ZSwgJi5hY3RpdmUge1xuICAgIGNvbG9yICAgICAgOiAjRkZGRkZGO1xuICAgIGJhY2tnc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ExZ3NTMEZCU3l4RlFVRkpMRWxCUVVrN1JVRkRZaXhOUVVGTkxFVkJRVWNzU1VGQlNUdEZRVU5pTEUxQlFVMHNSVUZCUnl4cFFrRkJhVUk3UTBGRGVrSWlmUT09ICovXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vc3JjL3Njc3MvYmFja2VuZC5zY3NzIl0sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUFBO0FBQ0E7QUNDQTtBQUNBO0FEUEE7Ozs7QUFPQTtBQUNBO0FDTUE7QUFDQTtBQ0ZBO0FGQUE7QUNLQTtBQUNBO0FESEE7QUFDQTtBQ0tBO0FBQ0E7QURMQTtBQUNBO0FBQ0E7QUNPQTtBQUNBO0FETkE7QUFDQTtBQUNBO0FBQ0E7QUNRQTtBQUNBO0FEbEJBO0FBWUE7QUFDQTtBQ1NBO0FBQ0E7QUROQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FDUUE7QUFDQTtBRFBBOztBQUNBO0FBQ0E7QUFDQTtBQ1VBO0FBQ0E7QURkQTs7QUFLQTtBQ2FBO0FBQ0E7QURiQTs7OztBQUNBO0FDa0JBO0FBQ0E7QURiQTtBQUNBO0FDZUE7QUFDQTtBRGJBO0FBQ0E7QUFDQTtBQUNBO0FDZUE7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=*/
assets/css/admin.min.css CHANGED
@@ -1,8 +1,8 @@
1
/*!
2
- * WooCommerce Variation Swatches v1.0.10
3
*
4
* Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
- * Date: 2018-2-22 21:58:22
6
* Released under the GPLv3 license.
7
*/
8
- .button.button-danger{color:#fff;background-color:#af2d2b;border-color:#a62d2b;-webkit-box-shadow:0 1px 0 #a72d2b;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-depends]{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}
1
/*!
2
+ * WooCommerce Variation Swatches v1.0.11
3
*
4
* Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
+ * Date: 2018-2-28 04:08:07
6
* Released under the GPLv3 license.
7
*/
8
+ .button.button-danger{color:#fff;background-color:#af2d2b;border-color:#a62d2b;-webkit-box-shadow:0 1px 0 #a72d2b;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-depends]{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}
assets/css/frontend-tooltip.css CHANGED
@@ -1,8 +1,8 @@
1
/*!
2
- * WooCommerce Variation Swatches v1.0.10
3
*
4
* Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
- * Date: 2018-2-22 21:58:19
6
* Released under the GPLv3 license.
7
*/
8
.variable-items-wrapper [data-wvstooltip] {
1
/*!
2
+ * WooCommerce Variation Swatches v1.0.11
3
*
4
* Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
+ * Date: 2018-2-28 04:08:03
6
* Released under the GPLv3 license.
7
*/
8
.variable-items-wrapper [data-wvstooltip] {
assets/css/frontend-tooltip.min.css CHANGED
@@ -1,8 +1,8 @@
1
/*!
2
- * WooCommerce Variation Swatches v1.0.10
3
*
4
* Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
- * Date: 2018-2-22 21:58:22
6
* Released under the GPLv3 license.
7
*/
8
.variable-items-wrapper [data-wvstooltip]{position:relative;cursor:pointer}.variable-items-wrapper [data-wvstooltip]:after,.variable-items-wrapper [data-wvstooltip]:before{visibility:hidden;opacity:0;pointer-events:none;-webkit-box-sizing:inherit;box-sizing:inherit;position:absolute;bottom:130%;left:50%;z-index:9;-webkit-transform:translateZ(0);transform:translateZ(0)}.variable-items-wrapper [data-wvstooltip]:before{margin-bottom:5px;margin-left:-50px;padding:7px;width:100px;border-radius:3px;background-color:#000;background-color:rgba(51,51,51,.9);color:#fff;content:attr(data-wvstooltip);text-align:center;font-size:14px;line-height:1.2}.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 [data-wvstooltip]:hover:after,.variable-items-wrapper [data-wvstooltip]:hover:before{visibility:visible;opacity:1}
1
/*!
2
+ * WooCommerce Variation Swatches v1.0.11
3
*
4
* Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
+ * Date: 2018-2-28 04:08:07
6
* Released under the GPLv3 license.
7
*/
8
.variable-items-wrapper [data-wvstooltip]{position:relative;cursor:pointer}.variable-items-wrapper [data-wvstooltip]:after,.variable-items-wrapper [data-wvstooltip]:before{visibility:hidden;opacity:0;pointer-events:none;-webkit-box-sizing:inherit;box-sizing:inherit;position:absolute;bottom:130%;left:50%;z-index:9;-webkit-transform:translateZ(0);transform:translateZ(0)}.variable-items-wrapper [data-wvstooltip]:before{margin-bottom:5px;margin-left:-50px;padding:7px;width:100px;border-radius:3px;background-color:#000;background-color:rgba(51,51,51,.9);color:#fff;content:attr(data-wvstooltip);text-align:center;font-size:14px;line-height:1.2}.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 [data-wvstooltip]:hover:after,.variable-items-wrapper [data-wvstooltip]:hover:before{visibility:visible;opacity:1}
assets/css/frontend.css CHANGED
@@ -1,8 +1,8 @@
1
/*!
2
- * WooCommerce Variation Swatches v1.0.10
3
*
4
* Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
- * Date: 2018-2-22 21:58:19
6
* Released under the GPLv3 license.
7
*/
8
.variable-items-wrapper {
1
/*!
2
+ * WooCommerce Variation Swatches v1.0.11
3
*
4
* Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
+ * Date: 2018-2-28 04:08:03
6
* Released under the GPLv3 license.
7
*/
8
.variable-items-wrapper {
assets/css/frontend.min.css CHANGED
@@ -1,8 +1,8 @@
1
/*!
2
- * WooCommerce Variation Swatches v1.0.10
3
*
4
* Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
- * Date: 2018-2-22 21:58:22
6
* Released under the GPLv3 license.
7
*/
8
.variable-items-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin:0}.variable-items-wrapper .variable-item{-webkit-box-sizing:border-box;box-sizing:border-box;list-style:none;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.variable-items-wrapper .variable-item.color-variable-item{padding:2px;margin:2px;width:30px;height:30px;border:1px solid rgba(0,0,0,.2)}.variable-items-wrapper .variable-item.color-variable-item span{width:20px;height:20px;position:relative}.variable-items-wrapper .variable-item.color-variable-item span:after{position:absolute;content:"";width:20px;height:20px;border-radius:100%;-webkit-box-shadow:inset 0 0 1px 0 rgba(0,0,0,.5);box-shadow:inset 0 0 1px 0 rgba(0,0,0,.5)}.variable-items-wrapper .variable-item.button-variable-item{padding:2px;margin:2px;width:36px;height:36px;border:1px solid rgba(0,0,0,.2)}.variable-items-wrapper .variable-item.button-variable-item span{font-size:1rem;line-height:1}.variable-items-wrapper .variable-item.button-variable-item.selected,.variable-items-wrapper .variable-item.button-variable-item.selected:hover{border:1px solid #000;background:#000;color:#fff}.variable-items-wrapper .variable-item.image-variable-item{padding:2px;margin:2px;width:40px;height:40px;border:1px solid rgba(0,0,0,.2)}.variable-items-wrapper .variable-item:last-of-type{margin-right:0}.variable-items-wrapper .variable-item.color-variable-item.selected,.variable-items-wrapper .variable-item.color-variable-item.selected:hover,.variable-items-wrapper .variable-item.image-variable-item.selected,.variable-items-wrapper .variable-item.image-variable-item.selected:hover,.variable-items-wrapper .variable-item.selected,.variable-items-wrapper .variable-item.selected:hover,.variable-items-wrapper .variable-item:hover{border:1px solid #000}.variable-items-wrapper .variable-item.disabled,.variable-items-wrapper .variable-item.disabled:hover{cursor:not-allowed;opacity:.5}.variable-items-wrapper [data-tooltip]:before{background:rgba(0,0,0,.99)!important}.variable-items-wrapper [data-tooltip]:after{border-top-color:rgba(0,0,0,.99)!important}.woo-variation-swatches-style-rounded .variable-item,.woo-variation-swatches-style-rounded .variable-item img,.woo-variation-swatches-style-rounded .variable-item span{border-radius:100%}.woo-variation-swatches-style-squared .variable-item{border-radius:0}.woo-variation-swatches-style-squared .variable-item.button-variable-item{width:auto}.woo-variation-swatches-style-squared .variable-item.button-variable-item span{width:auto;padding:0 1rem}.woo-variation-swatches-style-squared .variable-item.color-variable-item span:after{border-radius:0}
1
/*!
2
+ * WooCommerce Variation Swatches v1.0.11
3
*
4
* Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
+ * Date: 2018-2-28 04:08:07
6
* Released under the GPLv3 license.
7
*/
8
.variable-items-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin:0}.variable-items-wrapper .variable-item{-webkit-box-sizing:border-box;box-sizing:border-box;list-style:none;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.variable-items-wrapper .variable-item.color-variable-item{padding:2px;margin:2px;width:30px;height:30px;border:1px solid rgba(0,0,0,.2)}.variable-items-wrapper .variable-item.color-variable-item span{width:20px;height:20px;position:relative}.variable-items-wrapper .variable-item.color-variable-item span:after{position:absolute;content:"";width:20px;height:20px;border-radius:100%;-webkit-box-shadow:inset 0 0 1px 0 rgba(0,0,0,.5);box-shadow:inset 0 0 1px 0 rgba(0,0,0,.5)}.variable-items-wrapper .variable-item.button-variable-item{padding:2px;margin:2px;width:36px;height:36px;border:1px solid rgba(0,0,0,.2)}.variable-items-wrapper .variable-item.button-variable-item span{font-size:1rem;line-height:1}.variable-items-wrapper .variable-item.button-variable-item.selected,.variable-items-wrapper .variable-item.button-variable-item.selected:hover{border:1px solid #000;background:#000;color:#fff}.variable-items-wrapper .variable-item.image-variable-item{padding:2px;margin:2px;width:40px;height:40px;border:1px solid rgba(0,0,0,.2)}.variable-items-wrapper .variable-item:last-of-type{margin-right:0}.variable-items-wrapper .variable-item.color-variable-item.selected,.variable-items-wrapper .variable-item.color-variable-item.selected:hover,.variable-items-wrapper .variable-item.image-variable-item.selected,.variable-items-wrapper .variable-item.image-variable-item.selected:hover,.variable-items-wrapper .variable-item.selected,.variable-items-wrapper .variable-item.selected:hover,.variable-items-wrapper .variable-item:hover{border:1px solid #000}.variable-items-wrapper .variable-item.disabled,.variable-items-wrapper .variable-item.disabled:hover{cursor:not-allowed;opacity:.5}.variable-items-wrapper [data-tooltip]:before{background:rgba(0,0,0,.99)!important}.variable-items-wrapper [data-tooltip]:after{border-top-color:rgba(0,0,0,.99)!important}.woo-variation-swatches-style-rounded .variable-item,.woo-variation-swatches-style-rounded .variable-item img,.woo-variation-swatches-style-rounded .variable-item span{border-radius:100%}.woo-variation-swatches-style-squared .variable-item{border-radius:0}.woo-variation-swatches-style-squared .variable-item.button-variable-item{width:auto}.woo-variation-swatches-style-squared .variable-item.button-variable-item span{width:auto;padding:0 1rem}.woo-variation-swatches-style-squared .variable-item.color-variable-item span:after{border-radius:0}
assets/css/wvs-customize-heading-control.css ADDED
@@ -0,0 +1,27 @@
1
+ /*!
2
+ * WooCommerce Variation Swatches v1.0.11
3
+ *
4
+ * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
+ * Date: 2018-2-28 04:08:03
6
+ * Released under the GPLv3 license.
7
+ */
8
+ .accordion-section-content li:nth-child(2).customize-control-wvs-heading .wvs-customize-heading-control-title {
9
+ margin-top: -15px;
10
+ margin-bottom: 0;
11
+ }
12
+
13
+ .wvs-customize-heading-control-title {
14
+ background-color: #191E23;
15
+ padding: 10px 15px;
16
+ color: #FFFFFF;
17
+ margin: 5px -15px;
18
+ font-size: 1rem;
19
+ font-weight: 200;
20
+ display: block;
21
+ overflow: hidden;
22
+ white-space: nowrap;
23
+ text-overflow: ellipsis;
24
+ }
25
+
26
+
27
+ /*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXRzL2Nzcy93dnMtY3VzdG9taXplLWhlYWRpbmctY29udHJvbC5jc3MiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvc2Nzcy9zcmMvc2Nzcy9jdXN0b21pemUtaGVhZGluZy1jb250cm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G4gIG1hcmdpbi1ib3R0b206IDA7XG59XG5cbi53dnMtY3VzdG9taXplLWhlYWRpbmctY29udHJvbC10aXRsZSB7XG4gIGJhY2tncm91bmQtY29sb3I6ICMxOTFFMjM7XG4gIHBhZGRpbmc6IDEwcHggMTVweDtcbiAgY29sb3I6ICNGRkZGRkY7XG4gIG1hcmdpbjogNXB4IC0xNXB4O1xuICBmb250LXNpemU6IDFyZW07XG4gIGZvbnQtd2VpZ2h0OiAyMDA7XG4gIGRpc3BsYXk6IGJsb2NrO1xuICBvdmVyZmxvdzogaGlkZGVuO1xuICB3aGl0ZS1zcGFjZTogbm93cmFwO1xuICB0ZXh0LW92ZXJmbG93OiBlbGxpcHNpcztcbn1cblxuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vY3VzdG9taXplLWhlYWRpbmctY29udHJvbC5zY3NzIl0sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBRUE7QUFDQTtBQUNBO0FDREE7QUFDQTtBRElBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUNGQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==*/
assets/css/wvs-customize-heading-control.min.css ADDED
@@ -0,0 +1,8 @@
1
+ /*!
2
+ * WooCommerce Variation Swatches v1.0.11
3
+ *
4
+ * Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
+ * Date: 2018-2-28 04:08:07
6
+ * Released under the GPLv3 license.
7
+ */
8
+ .accordion-section-content li:nth-child(2).customize-control-wvs-heading .wvs-customize-heading-control-title{margin-top:-15px;margin-bottom:0}.wvs-customize-heading-control-title{background-color:#191e23;padding:10px 15px;color:#fff;margin:5px -15px;font-size:1rem;font-weight:200;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
assets/js/admin.js CHANGED
@@ -1,8 +1,8 @@
1
/*!
2
- * WooCommerce Variation Swatches v1.0.10
3
*
4
* Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
- * Date: 2018-2-22 21:58:19
6
* Released under the GPLv3 license.
7
*/
8
/******/ (function(modules) { // webpackBootstrap
@@ -77,7 +77,8 @@
77
__webpack_require__(1);
78
__webpack_require__(3);
79
__webpack_require__(4);
80
- module.exports = __webpack_require__(5);
81
82
83
/***/ }),
@@ -94,6 +95,13 @@ jQuery(function ($) {
94
PluginHelper.ColorPicker();
95
PluginHelper.FieldDependency();
96
PluginHelper.ImageUploader();
97
});
98
}); // end of jquery main wrapper
99
@@ -104,11 +112,13 @@ jQuery(function ($) {
104
"use strict";
105
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
106
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PluginHelper", function() { return PluginHelper; });
107
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
108
109
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
110
111
- /*global WVSPluginObject, wp*/
112
113
var PluginHelper = function ($) {
114
var PluginHelper = function () {
@@ -222,6 +232,115 @@ var PluginHelper = function ($) {
222
$(selector).FormFieldDependency();
223
}
224
}
225
}]);
226
227
return PluginHelper;
@@ -250,6 +369,12 @@ var PluginHelper = function ($) {
250
251
// removed by extract-text-webpack-plugin
252
253
/***/ })
254
/******/ ]);
255
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXRzL2pzL2FkbWluLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIDM1ODA0NWMxMWVjNjAzMz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aWxlX2ZyYW1lKSB7XG4gICAgICAgICAgICAgICAgICAgIGZpbGVfZnJhbWUub3BlbigpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gQ3JlYXRlIHRoZSBtZWRpYSBmcmFtZS5cbiAgICAgICAgICAgICAgICBmaWxlX2ZyYW1lID0gd3AubWVkaWEuZnJhbWVzLnNlbGVjdF9pbWFnZSA9IHdwLm1lZGlhKHtcbiAgICAgICAgICAgICAgICAgICAgdGl0bGUgICAgOiBXVlNQbHVnaW5PYmplY3QubWVkaWFfdGl0bGUsXG4gICAgICAgICAgICAgICAgICAgIGJ1dHRvbiAgIDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGV4dCA6IFdWU1BsdWdpbk9iamVjdC5idXR0b25fdGl0bGVcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgbXVsdGlwbGUgOiBmYWxzZSxcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIC8vIFdoZW4gYW4gaW1hZ2UgaXMgc2VsZWN0ZWQsIHJ1biBhIGNhbGxiYWNrLlxuICAgICAgICAgICAgICAgIGZpbGVfZnJhbWUub24oJ3NlbGVjdCcsICgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgbGV0IGF0dGFjaG1lbnQgPSBmaWxlX2ZyYW1lLnN0YXRlKCkuZ2V0KCdzZWxlY3Rpb24nKS5maXJzdCgpLnRvSlNPTigpO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmICgkLnRyaW0oYXR0YWNobWVudC5pZCkgIT09ICcnKSB7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSAodHlwZW9mKGF0dGFjaG1lbnQuc2l6ZXMudGh1bWJuYWlsKSA9PT0gJ3VuZGVmaW5lZCcpID8gYXR0YWNobWVudC5zaXplcy5mdWxsLnVybCA6IGF0dGFjaG1lbnQuc2l6ZXMudGh1bWJuYWlsLnVybDtcblxuICAgICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5wcmV2KCkudmFsKGF0dGFjaG1lbnQuaWQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5jbG9zZXN0KCcubWV0YS1pbWFnZS1maWVsZC13cmFwcGVyJykuZmluZCgnaW1nJykuYXR0cignc3JjJywgdXJsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICQodGhpcykubmV4dCgpLnNob3coKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAvL2ZpbGVfZnJhbWUuY2xvc2UoKTtcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIC8vIFdoZW4gb3BlbiBzZWxlY3Qgc2VsZWN0ZWRcbiAgICAgICAgICAgICAgICBmaWxlX2ZyYW1lLm9uKCdvcGVuJywgKCkgPT4ge1xuXG4gICAgICAgICAgICAgICAgICAgIC8vIEdyYWIgb3VyIGF0dGFjaG1lbnQgc2VsZWN0aW9uIGFuZCBjb25zdHJ1Y3QgYSBKU09OIHJlcHJlc2VudGF0aW9uIG9mIHRoZSBtb2RlbC5cbiAgICAgICAgICAgICAgICAgICAgbGV0IHNlbGVjdGlvbiAgPSBmaWxlX2ZyYW1lLnN0YXRlKCkuZ2V0KCdzZWxlY3Rpb24nKTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IGN1cnJlbnQgICAgPSAkKHRoaXMpLnByZXYoKS52YWwoKTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IGF0dGFjaG1lbnQgPSB3cC5tZWRpYS5hdHRhY2htZW50KGN1cnJlbnQpO1xuICAgICAgICAgICAgICAgICAgICBhdHRhY2htZW50LmZldGNoKCk7XG4gICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbi5hZGQoYXR0YWNobWVudCA/IFthdHRhY2htZW50XSA6IFtdKTtcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIC8vIEZpbmFsbHksIG9wZW4gdGhlIG1vZGFsLlxuICAgICAgICAgICAgICAgIGZpbGVfZnJhbWUub3BlbigpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgc3RhdGljIFJlbW92ZUltYWdlKGV2ZW50KSB7XG5cbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICBldmVudC5zdG9wUHJvcGFnYXRpb24oKTtcblxuICAgICAgICAgICAgbGV0IHBsYWNlaG9sZGVyID0gJCh0aGlzKS5jbG9zZXN0KCcubWV0YS1pbWFnZS1maWVsZC13cmFwcGVyJykuZmluZCgnaW1nJykuZGF0YSgncGxhY2Vob2xkZXInKTtcbiAgICAgICAgICAgICQodGhpcykuY2xvc2VzdCgnLm1ldGEtaW1hZ2UtZmllbGQtd3JhcHBlcicpLmZpbmQoJ2ltZycpLmF0dHIoJ3NyYycsIHBsYWNlaG9sZGVyKTtcbiAgICAgICAgICAgICQodGhpcykucHJldigpLnByZXYoKS52YWwoJycpO1xuICAgICAgICAgICAgJCh0aGlzKS5oaWRlKCk7XG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cblxuICAgICAgICBzdGF0aWMgU2VsZWN0V29vKHNlbGVjdG9yID0gJ3NlbGVjdC53dnMtc2VsZWN0d29vJykge1xuICAgICAgICAgICAgaWYgKCQoKS5zZWxlY3RXb28pIHtcbiAgICAgICAgICAgICAgICAkKHNlbGVjdG9yKS5zZWxlY3RXb28oe1xuICAgICAgICAgICAgICAgICAgICBhbGxvd0NsZWFyIDogdHJ1ZVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgc3RhdGljIENvbG9yUGlja2VyKHNlbGVjdG9yID0gJ2lucHV0Lnd2cy1jb2xvci1waWNrZXInKSB7XG4gICAgICAgICAgICBpZiAoJCgpLndwQ29sb3JQaWNrZXIp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E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUE5REE7QUFBQTtBQUFBO0FBQ0E7QUFpRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBMUVBO0FBQUE7QUFBQTtBQTRFQTtBQUNBO0FBQUE7QUFDQTtBQUNBO0FBREE7QUFHQTtBQUNBO0FBbEZBO0FBQUE7QUFBQTtBQW9GQTtBQUNBO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUF4RkE7QUFBQTtBQUFBO0FBMEZBO0FBQ0E7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQTlGQTtBQUNBO0FBREE7QUFBQTtBQUNBO0FBZ0dBO0FBQ0E7QUFDQTs7Ozs7OztBQ3JHQTs7Ozs7O0FDQUE7Ozs7OztBQ0FBOzs7QSIsInNvdXJjZVJvb3QiOiIifQ==
1
/*!
2
+ * WooCommerce Variation Swatches v1.0.11
3
*
4
* Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
+ * Date: 2018-2-28 04:08:03
6
* Released under the GPLv3 license.
7
*/
8
/******/ (function(modules) { // webpackBootstrap
77
__webpack_require__(1);
78
__webpack_require__(3);
79
__webpack_require__(4);
80
+ __webpack_require__(5);
81
+ module.exports = __webpack_require__(6);
82
83
84
/***/ }),
95
PluginHelper.ColorPicker();
96
PluginHelper.FieldDependency();
97
PluginHelper.ImageUploader();
98
+ PluginHelper.AttributeDialog();
99
+ $(document.body).on('woocommerce_added_attribute', function () {
100
+ PluginHelper.SelectWoo();
101
+ PluginHelper.ColorPicker();
102
+ PluginHelper.ImageUploader();
103
+ PluginHelper.AttributeDialog();
104
+ });
105
});
106
}); // end of jquery main wrapper
107
112
"use strict";
113
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
114
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PluginHelper", function() { return PluginHelper; });
115
+ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
116
+
117
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
118
119
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
120
121
+ /*global WVSPluginObject, wp, woocommerce_admin_meta_boxes*/
122
123
var PluginHelper = function ($) {
124
var PluginHelper = function () {
232
$(selector).FormFieldDependency();
233
}
234
}
235
+ }, {
236
+ key: 'savingDialog',
237
+ value: function savingDialog($wrapper, $dialog, taxonomy) {
238
+
239
+ var data = {};
240
+ var term = '';
241
+
242
+ // @TODO: We should use form data, because we have to pick array based data also :)
243
+
244
+ $dialog.find('input, select').each(function () {
245
+ var key = $(this).attr('name');
246
+ var value = $(this).val();
247
+ if (key) {
248
+ if (key === 'tag_name') {
249
+ term = value;
250
+ } else {
251
+ data[key] = value;
252
+ }
253
+ $(this).val('');
254
+ }
255
+ });
256
+
257
+ if (term) {
258
+ $('.product_attributes').block({
259
+ message: null,
260
+ overlayCSS: {
261
+ background: '#fff',
262
+ opacity: 0.6
263
+ }
264
+ });
265
+
266
+ var ajax_data = _extends({
267
+ action: 'woocommerce_add_new_attribute',
268
+ taxonomy: taxonomy,
269
+ term: term,
270
+ security: woocommerce_admin_meta_boxes.add_attribute_nonce
271
+ }, data);
272
+
273
+ $.post(woocommerce_admin_meta_boxes.ajax_url, ajax_data, function (response) {
274
+
275
+ if (response.error) {
276
+ // Error.
277
+ window.alert(response.error);
278
+ } else if (response.slug) {
279
+ // Success.
280
+ $wrapper.find('select.attribute_values').append('<option value="' + response.term_id + '" selected="selected">' + response.name + '</option>');
281
+ $wrapper.find('select.attribute_values').change();
282
+ }
283
+
284
+ $('.product_attributes').unblock();
285
+ });
286
+ } else {
287
+ $('.product_attributes').unblock();
288
+ }
289
+ }
290
+ }, {
291
+ key: 'AttributeDialog',
292
+ value: function AttributeDialog() {
293
+
294
+ var self = this;
295
+ $('.product_attributes').on('click', 'button.wvs_add_new_attribute', function (event) {
296
+
297
+ event.preventDefault();
298
+
299
+ var $wrapper = $(this).closest('.woocommerce_attribute');
300
+ var attribute = $wrapper.data('taxonomy');
301
+ var title = $(this).data('dialog_title');
302
+
303
+ $('.wvs-attribute-dialog-for-' + attribute).dialog({
304
+ title: '',
305
+ dialogClass: 'wp-dialog wvs-attribute-dialog',
306
+ classes: {
307
+ "ui-dialog": "wp-dialog wvs-attribute-dialog"
308
+ },
309
+ autoOpen: false,
310
+ draggable: true,
311
+ width: 'auto',
312
+ modal: true,
313
+ resizable: false,
314
+ closeOnEscape: true,
315
+ position: {
316
+ my: "center",
317
+ at: "center",
318
+ of: window
319
+ },
320
+ open: function open() {
321
+ // close dialog by clicking the overlay behind it
322
+ $('.ui-widget-overlay').bind('click', function () {
323
+ $('#attribute-dialog').dialog('close');
324
+ });
325
+ },
326
+ create: function create() {
327
+ // style fix for WordPress admin
328
+ // $('.ui-dialog-titlebar-close').addClass('ui-button');
329
+ }
330
+ }).dialog("option", "title", title).dialog("option", "buttons", [{
331
+ text: WVSPluginObject.dialog_save,
332
+ click: function click() {
333
+ self.savingDialog($wrapper, $(this), attribute);
334
+ $(this).dialog("close").dialog("destroy");
335
+ }
336
+ }, {
337
+ text: WVSPluginObject.dialog_cancel,
338
+ click: function click() {
339
+ $(this).dialog("close").dialog("destroy");
340
+ }
341
+ }]).dialog('open');
342
+ });
343
+ }
344
}]);
345
346
return PluginHelper;
369
370
// removed by extract-text-webpack-plugin
371
372
+ /***/ }),
373
+ /* 6 */
374
+ /***/ (function(module, exports) {
375
+
376
+ // removed by extract-text-webpack-plugin
377
+
378
/***/ })
379
/******/ ]);
380
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXRzL2pzL2FkbWluLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIDM3YzMyZGFjOGI1ODFjZDQzNzc1Iiwid2VicGFjazovLy9zcmMvanMvYmFja2VuZC5qcyIsIndlYnBhY2s6Ly8vc3JjL2pzL1BsdWdpbkhlbHBlci5qcyIsIndlYnBhY2s6Ly8vLi9zcmMvc2Nzcy9iYWNrZW5kLnNjc3M/YmU2MSIsIndlYnBhY2s6Ly8vLi9zcmMvc2Nzcy9mcm9udGVuZC5zY3NzIiwid2VicGFjazovLy8uL3NyYy9zY3NzL3Rvb2x0aXAuc2NzcyIsIndlYnBhY2s6Ly8vLi9zcmMvc2Nzcy9jdXN0b21pemUtaGVhZGluZy1jb250cm9sLnNjc3MiXSwic291cmNlc0NvbnRlbnQiOlsiIFx0Ly8gVGhlIG1vZHVsZSBjYWNoZVxuIFx0dmFyIGluc3RhbGxlZE1vZHVsZXMgPSB7fTtcblxuIFx0Ly8gVGhlIHJlcXVpcmUgZnVuY3Rpb25cbiBcdGZ1bmN0aW9uIF9fd2VicGFja19yZXF1aXJlX18obW9kdWxlSWQpIHtcblxuIFx0XHQvLyBDaGVjayBpZiBtb2R1bGUgaXMgaW4gY2FjaGVcbiBcdFx0aWYoaW5zdGFsbGVkTW9kdWxlc1ttb2R1bGVJZF0pIHtcbiBcdFx0XHRyZXR1cm4gaW5zdGFsbGVkTW9kdWxlc1ttb2R1bGVJZF0uZXhwb3J0cztcbiBcdFx0fVxuIFx0XHQvLyBDcmVhdGUgYSBuZXcgbW9kdWxlIChhbmQgcHV0IGl0IGludG8gdGhl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HN0YXRpYyBJbWFnZVVwbG9hZGVyKCkge1xuICAgICAgICAgICAgJChkb2N1bWVudCkub2ZmKCdjbGljaycsICdidXR0b24ud3ZzX3VwbG9hZF9pbWFnZV9idXR0b24nKTtcbiAgICAgICAgICAgICQoZG9jdW1lbnQpLm9uKCdjbGljaycsICdidXR0b24ud3ZzX3VwbG9hZF9pbWFnZV9idXR0b24nLCB0aGlzLkFkZEltYWdlKTtcbiAgICAgICAgICAgICQoZG9jdW1lbnQpLm9uKCdjbGljaycsICdidXR0b24ud3ZzX3JlbW92ZV9pbWFnZV9idXR0b24nLCB0aGlzLlJlbW92ZUltYWdlKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHN0YXRpYyBBZGRJbWFnZShldmVudCkge1xuXG4gICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICAgICAgZXZlbnQuc3RvcFByb3BhZ2F0aW9uKCk7XG5cbiAgICAgICAgICAgIGxldCBmaWxlX2ZyYW1lO1xuXG4gICAgICAgICAgICBpZiAodHlwZW9mIHdwICE9PSAndW5kZWZpbmVkJyAmJiB3cC5tZWRpYSAmJiB3cC5tZWRpYS5lZGl0b3IpIHtcblxuICAgICAgICAgICAgICAgIC8vIElmIHRoZSBtZWRpYSBmcmFtZSBhbHJlYWR5IGV4aXN0cywgcmVvcGVuIGl0LlxuICAgICAgICAgICAgICAgIGlmIChmaWxlX2ZyYW1lKSB7XG4gICAgICAgICAgICAgICAgICAgIGZpbGVfZnJhbWUub3BlbigpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gQ3JlYXRlIHRoZSBtZWRpYSBmcmFtZS5cbiAgICAgICAgICAgICAgICBmaWxlX2ZyYW1lID0gd3AubWVkaWEuZnJhbWVzLnNlbGVjdF9pbWFnZSA9IHdwLm1lZGlhKHtcbiAgICAgICAgICAgICAgICAgICAgdGl0bGUgICAgOiBXVlNQbHVnaW5PYmplY3QubWVkaWFfdGl0bGUsXG4gICAgICAgICAgICAgICAgICAgIGJ1dHRvbiAgIDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGV4dCA6IFdWU1BsdWdpbk9iamVjdC5idXR0b25fdGl0bGVcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgbXVsdGlwbGUgOiBmYWxzZSxcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIC8vIFdoZW4gYW4gaW1hZ2UgaXMgc2VsZWN0ZWQsIHJ1biBhIGNhbGxiYWNrLlxuICAgICAgICAgICAgICAgIGZpbGVfZnJhbWUub24oJ3NlbGVjdCcsICgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgbGV0IGF0dGFjaG1lbnQgPSBmaWxlX2ZyYW1lLnN0YXRlKCkuZ2V0KCdzZWxlY3Rpb24nKS5maXJzdCgpLnRvSlNPTigpO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmICgkLnRyaW0oYXR0YWNobWVudC5pZCkgIT09ICcnKSB7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSAodHlwZW9mKGF0dGFjaG1lbnQuc2l6ZXMudGh1bWJuYWlsKSA9PT0gJ3VuZGVmaW5lZCcpID8gYXR0YWNobWVudC5zaXplcy5mdWxsLnVybCA6IGF0dGFjaG1lbnQuc2l6ZXMudGh1bWJuYWlsLnVybDtcblxuICAgICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5wcmV2KCkudmFsKGF0dGFjaG1lbnQuaWQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5jbG9zZXN0KCcubWV0YS1pbWFnZS1maWVsZC13cmFwcGVyJykuZmluZCgnaW1nJykuYXR0cignc3JjJywgdXJsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICQodGhpcykubmV4dCgpLnNob3coKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAvL2ZpbGVfZnJhbWUuY2xvc2UoKTtcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIC8vIFdoZW4gb3BlbiBzZWxlY3Qgc2VsZWN0ZWRcbiAgICAgICAgICAgICAgICBmaWxlX2ZyYW1lLm9uKCdvcGVuJywgKCkgPT4ge1xuXG4gICAgICAgICAgICAgICAgICAgIC8vIEdyYWIgb3VyIGF0dGFjaG1lbnQgc2VsZWN0aW9uIGFuZCBjb25zdHJ1Y3QgYSBKU09OIHJlcHJlc2VudGF0aW9uIG9mIHRoZSBtb2RlbC5cbiAgICAgICAgICAgICAgICAgICAgbGV0IHNlbGVjdGlvbiAgPSBmaWxlX2ZyYW1lLnN0YXRlKCkuZ2V0KCdzZWxlY3Rpb24nKTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IGN1cnJlbnQgICAgPSAkKHRoaXMpLnByZXYoKS52YWwoKTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IGF0dGFjaG1lbnQgPSB3cC5tZWRpYS5hdHRhY2htZW50KGN1cnJlbnQpO1xuICAgICAgICAgICAgICAgICAgICBhdHRhY2htZW50LmZldGNoKCk7XG4gICAgICAgICAgICAgICAgICAgIHNlbGVjdGlvbi5hZGQoYXR0YWNobWVudCA/IFthdHRhY2htZW50XSA6IFtdKTtcbiAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgIC8vIEZpbmFsbHksIG9wZW4gdGhlIG1vZGFsLlxuICAgICAgICAgICAgICAgIGZpbGVfZnJhbWUub3BlbigpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgc3RhdGljIFJlbW92ZUltYWdlKGV2ZW50KSB7XG5cbiAgICAgICAgICAgIGV2ZW50LnByZXZlbnREZWZhdWx0KCk7XG4gICAgICAgICAgICBldmVudC5zdG9wUHJvcGFnYXRpb24oKTtcblxuICAgICAgICAgICAgbGV0IHBsYWNlaG9sZGVyID0gJCh0aGlzKS5jbG9zZXN0KCcubWV0YS1pbWFnZS1maWVsZC13cmFwcGVyJykuZmluZCgnaW1nJykuZGF0YSgncGxhY2Vob2xkZXInKTtcbiAgICAgICAgICAgICQodGhpcykuY2xvc2VzdCgnLm1ldGEtaW1hZ2UtZmllbGQtd3JhcHBlcicpLmZpbmQoJ2ltZycpLmF0dHIoJ3NyYycsIHBsYWNlaG9sZGVyKTtcbiAgICAgICAgICAgICQodGhpcykucHJldigpLnByZXYoKS52YWwoJycpO1xuICAgICAgICAgICAgJCh0aGlzKS5oaWRlKCk7XG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cblxuICAgICAgICBzdGF0aWMgU2VsZWN0V29vKHNlbGVjdG9yID0gJ3NlbGVjdC53dnMtc2VsZWN0d29vJykge1xuICAgICAgICAgICAgaWYgKCQoKS5zZWxlY3RXb28pIHtcbiAgICAgICAgICAgICAgICAkKHNlbGVjdG9yKS5zZWxlY3RXb28oe1xuICAgICAgICAgICAgICAgICAgICBhbGxvd0NsZWFyIDogdHJ1ZVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgc3RhdGljIENvbG9yUGlja2VyKHNlbGVjdG9yID0gJ2lucHV0Lnd2cy1jb2xvci1waWNrZXInKSB7XG4gICAgICAgICAgICBpZiAoJCgpLndwQ29sb3JQaWNrZXIpIHtcbiAgICAgICAgICAgICAgICAkKHNlbGVjdG9yKS53cENvbG9yUGlja2VyKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBzdGF0aWMgRmllbGREZXBlbmRlbmN5KHNlbGVjdG9yID0gJ1tkYXRhLWRlcGVuZHNdJykge1xuICAgICAgICAgICAgaWYgKCQoKS5Gb3JtRmllbGREZXBlbmRlbmN5KSB7XG4gICAgICAgICAgICAgICAgJChzZWxlY3RvcikuRm9ybUZpZWxkRGVwZW5kZW5jeSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgc3RhdGljIHNhdmluZ0RpYWxvZygkd3JhcHBlciwgJGRpYWxvZywgdGF4b25vbXkpIHtcblxuICAgICAgICAgICAgbGV0IGRhdGEgPSB7fTtcbiAgICAgICAgICAgIGxldCB0ZXJtID0gJyc7XG5cbiAgICAgICAgICAgIC8vIEBUT0RPOiBXZSBzaG91bGQgdXNlIGZvcm0gZGF0YSwgYmVjYXVzZSB3ZSBoYXZlIHRvIHBpY2sgYXJyYXkgYmFzZWQgZGF0YSBhbHNvIDopXG5cbiAgICAgICAgICAgICRkaWFsb2cuZmluZChgaW5wdXQsIHNlbGVjdGApLmVhY2goZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIGxldCBrZXkgICA9ICQodGhpcykuYXR0cignbmFtZScpO1xuICAgICAgICAgICAgICAgIGxldCB2YWx1ZSA9ICQodGhpcykudmFsKCk7XG4gICAgICAgICAgICAgICAgaWYgKGtleSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoa2V5ID09PSAndGFnX25hbWUnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0ZXJtID0gdmFsdWVcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFba2V5XSA9IHZhbHVlXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS52YWwoJycpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIGlmICh0ZXJtKSB7XG4gICAgICAgICAgICAgICAgJCgnLnByb2R1Y3RfYXR0cmlidXRlcycpLmJsb2NrKHtcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSAgICA6IG51bGwsXG4gICAgICAgICAgICAgICAgICAgIG92ZXJsYXlDU1MgOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kIDogJyNmZmYnLFxuICAgICAgICAgICAgICAgICAgICAgICAgb3BhY2l0eSAgICA6IDAuNlxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICBsZXQgYWpheF9kYXRhID0ge1xuICAgICAgICAgICAgICAgICAgICBhY3Rpb24gICA6ICd3b29jb21tZXJjZV9hZGRfbmV3X2F0dHJpYnV0ZScsXG4gICAgICAgICAgICAgICAgICAgIHRheG9ub215IDogdGF4b25vbXksXG4gICAgICAgICAgICAgICAgICAgIHRlcm0gICAgIDogdGVybSxcbiAgICAgICAgICAgICAgICAgICAgc2VjdXJpdHkgOiB3b29jb21tZXJjZV9hZG1pbl9tZXRhX2JveGVzLmFkZF9hdHRyaWJ1dGVfbm9uY2UsXG4gICAgICAgICAgICAgICAgICAgIC4uLmRhdGFcbiAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgJC5wb3N0KHdvb2NvbW1lcmNlX2FkbWluX21ldGFfYm94ZXMuYWpheF91cmwsIGFqYXhfZGF0YSwgZnVuY3Rpb24gKHJlc3BvbnNlKSB7XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3BvbnNlLmVycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBFcnJvci5cbiAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5hbGVydChyZXNwb25zZS5lcnJvcik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAocmVzcG9uc2Uuc2x1Zykge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gU3VjY2Vzcy5cbiAgICAgICAgICAgICAgICAgICAgICAgICR3cmFwcGVyLmZpbmQoJ3NlbGVjdC5hdHRyaWJ1dGVfdmFsdWVzJykuYXBwZW5kKCc8b3B0aW9uIHZhbHVlPVwiJyArIHJlc3BvbnNlLnRlcm1faWQgKyAnXCIgc2VsZWN0ZWQ9XCJzZWxlY3RlZFwiPicgKyByZXNwb25zZS5uYW1lICsgJzwvb3B0aW9uPicpO1xuICAgICAgICAgICAgICAgICAgICAgICAgJHdyYXBwZXIuZmluZCgnc2VsZWN0LmF0dHJpYnV0ZV92YWx1ZXMnKS5jaGFuZ2UoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICQoJy5wcm9kdWN0X2F0dHJpYnV0ZXMnKS51bmJsb2NrKCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAkKCcucHJvZHVjdF9hdHRyaWJ1dGVzJykudW5ibG9jaygpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgc3RhdGljIEF0dHJpYnV0ZURpYWxvZygpIHtcblxuICAgICAgICAgICAgbGV0IHNlbGYgPSB0aGlzO1xuICAgICAgICAgICAgJCgnLnByb2R1Y3RfYXR0cmlidXRlcycpLm9uKCdjbGljaycsICdidXR0b24ud3ZzX2FkZF9uZXdfYXR0cmlidXRlJywgZnVuY3Rpb24gKGV2ZW50KSB7XG5cbiAgICAgICAgICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuXG4gICAgICAgICAgICAgICAgbGV0ICR3cmFwcGVyICA9ICQodGhpcykuY2xvc2VzdCgnLndvb2NvbW1lcmNlX2F0dHJpYnV0ZScpO1xuICAgICAgICAgICAgICAgIGxldCBhdHRyaWJ1dGUgPSAkd3JhcHBlci5kYXRhKCd0YXhvbm9teScpO1xuICAgICAgICAgICAgICAgIGxldCB0aXRsZSAgICAgPSAkKHRoaXMpLmRhdGEoJ2RpYWxvZ190aXRsZScpO1xuXG4gICAgICAgICAgICAgICAgJCgnLnd2cy1hdHRyaWJ1dGUtZGlhbG9nLWZvci0nICsgYXR0cmlidXRlKS5kaWFsb2coe1xuICAgICAgICAgICAgICAgICAgICB0aXRsZSAgICAgICAgIDogJycsXG4gICAgICAgICAgICAgICAgICAgIGRpYWxvZ0NsYXNzICAgOiAnd3AtZGlhbG9nIHd2cy1hdHRyaWJ1dGUtZGlhbG9nJyxcbiAgICAgICAgICAgICAgICAgICAgY2xhc3NlcyAgICAgICA6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIFwidWktZGlhbG9nXCIgOiBcIndwLWRpYWxvZyB3dnMtYXR0cmlidXRlLWRpYWxvZ1wiXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIGF1dG9PcGVuICAgICAgOiBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICAgZHJhZ2dhYmxlICAgICA6IHRydWUsXG4gICAgICAgICAgICAgICAgICAgIHdpZHRoICAgICAgICAgOiAnYXV0bycsXG4gICAgICAgICAgICAgICAgICAgIG1vZGFsICAgICAgICAgOiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICByZXNpemFibGUgICAgIDogZmFsc2UsXG4gICAgICAgICAgICAgICAgICAgIGNsb3NlT25Fc2NhcGUgOiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbiAgICAgIDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgbXkgOiBcImNlbnRlclwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgYXQgOiBcImNlbnRlclwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgb2YgOiB3aW5kb3dcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgb3BlbiAgICAgICAgICA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGNsb3NlIGRpYWxvZyBieSBjbGlja2luZyB0aGUgb3ZlcmxheSBiZWhpbmQgaXRcbiAgICAgICAgICAgICAgICAgICAgICAgICQoJy51aS13aWRnZXQtb3ZlcmxheScpLmJpbmQoJ2NsaWNrJywgZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICQoJyNhdHRyaWJ1dGUtZGlhbG9nJykuZGlhbG9nKCdjbG9zZScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgY3JlYXRlICAgICAgICA6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHN0eWxlIGZpeCBmb3IgV29yZFByZXNzIGFkbWluXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyAkKCcudWktZGlhbG9nLXRpdGxlYmFyLWNsb3NlJykuYWRkQ2xhc3MoJ3VpLWJ1dHRvbicpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgLmRpYWxvZyhcIm9wdGlvblwiLCBcInRpdGxlXCIsIHRpdGxlKVxuICAgICAgICAgICAgICAgICAgICAuZGlhbG9nKFwib3B0aW9uXCIsIFwiYnV0dG9uc1wiLFxuICAgICAgICAgICAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dCAgOiBXVlNQbHVnaW5PYmplY3QuZGlhbG9nX3NhdmUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsaWNrIDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5zYXZpbmdEaWFsb2coJHdyYXBwZXIsICQodGhpcyksIGF0dHJpYnV0ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLmRpYWxvZyhcImNsb3NlXCIpLmRpYWxvZyhcImRlc3Ryb3lcIik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICA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QUZBO0FBRkE7QUFDQTtBQU9BO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFKQTtBQUNBO0FBT0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUVBO0FBQ0E7QUFDQTtBQXhKQTtBQUFBO0FBQUE7QUFDQTtBQTJKQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBREE7QUFHQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUhBO0FBS0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUExQkE7QUFnQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUxBO0FBUUE7QUFDQTtBQUNBO0FBQ0E7QUFKQTtBQVNBO0FBQ0E7QUFyTkE7QUFDQTtBQURBO0FBQUE7QUFDQTtBQXVOQTtBQUNBO0FBQ0E7Ozs7Ozs7QUM1TkE7Ozs7OztBQ0FBOzs7Ozs7QUNBQTs7Ozs7O0FDQUE7OztBIiwic291cmNlUm9vdCI6IiJ9
assets/js/admin.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){function t(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){n(1),n(3),n(4),e.exports=n(5)},function(e,t,n){jQuery(function(e){Promise.resolve().then(function(){return n(2)}).then(function(e){var t=e.PluginHelper;t.SelectWoo(),t.ColorPicker(),t.FieldDependency(),t.ImageUploader()})})},function(e,t,n){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"PluginHelper",function(){return r});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=function(e){return function(){function t(){o(this,t)}return i(t,null,[{key:"ImageUploader",value:function(){e(document).off("click","button.wvs_upload_image_button"),e(document).on("click","button.wvs_upload_image_button",this.AddImage),e(document).on("click","button.wvs_remove_image_button",this.RemoveImage)}},{key:"AddImage",value:function(t){var n=this;t.preventDefault(),t.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}),o.on("select",function(){var t=o.state().get("selection").first().toJSON();if(""!==e.trim(t.id)){var i=void 0===t.sizes.thumbnail?t.sizes.full.url:t.sizes.thumbnail.url;e(n).prev().val(t.id),e(n).closest(".meta-image-field-wrapper").find("img").attr("src",i),e(n).next().show()}}),o.on("open",function(){var t=o.state().get("selection"),i=e(n).prev().val(),r=wp.media.attachment(i);r.fetch(),t.add(r?[r]:[])}),o.open()}}},{key:"RemoveImage",value:function(t){t.preventDefault(),t.stopPropagation();var n=e(this).closest(".meta-image-field-wrapper").find("img").data("placeholder");return e(this).closest(".meta-image-field-wrapper").find("img").attr("src",n),e(this).prev().prev().val(""),e(this).hide(),!1}},{key:"SelectWoo",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"select.wvs-selectwoo";e().selectWoo&&e(t).selectWoo({allowClear:!0})}},{key:"ColorPicker",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"input.wvs-color-picker";e().wpColorPicker&&e(t).wpColorPicker()}},{key:"FieldDependency",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"[data-depends]";e().FormFieldDependency&&e(t).FormFieldDependency()}}]),t}()}(jQuery)},function(e,t){},function(e,t){},function(e,t){}]);
1
+ !function(e){function t(n){if(o[n])return o[n].exports;var i=o[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var o={};t.m=e,t.c=o,t.d=function(e,o,n){t.o(e,o)||Object.defineProperty(e,o,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,o){o(1),o(3),o(4),o(5),e.exports=o(6)},function(e,t,o){jQuery(function(e){Promise.resolve().then(function(){return o(2)}).then(function(t){var o=t.PluginHelper;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()})})})},function(e,t,o){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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 n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},a=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),r=function(e){return function(){function t(){n(this,t)}return a(t,null,[{key:"ImageUploader",value:function(){e(document).off("click","button.wvs_upload_image_button"),e(document).on("click","button.wvs_upload_image_button",this.AddImage),e(document).on("click","button.wvs_remove_image_button",this.RemoveImage)}},{key:"AddImage",value:function(t){var o=this;t.preventDefault(),t.stopPropagation();var n=void 0;if("undefined"!=typeof wp&&wp.media&&wp.media.editor){if(n)return void n.open();n=wp.media.frames.select_image=wp.media({title:WVSPluginObject.media_title,button:{text:WVSPluginObject.button_title},multiple:!1}),n.on("select",function(){var t=n.state().get("selection").first().toJSON();if(""!==e.trim(t.id)){var i=void 0===t.sizes.thumbnail?t.sizes.full.url:t.sizes.thumbnail.url;e(o).prev().val(t.id),e(o).closest(".meta-image-field-wrapper").find("img").attr("src",i),e(o).next().show()}}),n.on("open",function(){var t=n.state().get("selection"),i=e(o).prev().val(),a=wp.media.attachment(i);a.fetch(),t.add(a?[a]:[])}),n.open()}}},{key:"RemoveImage",value:function(t){t.preventDefault(),t.stopPropagation();var o=e(this).closest(".meta-image-field-wrapper").find("img").data("placeholder");return e(this).closest(".meta-image-field-wrapper").find("img").attr("src",o),e(this).prev().prev().val(""),e(this).hide(),!1}},{key:"SelectWoo",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"select.wvs-selectwoo";e().selectWoo&&e(t).selectWoo({allowClear:!0})}},{key:"ColorPicker",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"input.wvs-color-picker";e().wpColorPicker&&e(t).wpColorPicker()}},{key:"FieldDependency",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"[data-depends]";e().FormFieldDependency&&e(t).FormFieldDependency()}},{key:"savingDialog",value:function(t,o,n){var a={},r="";if(o.find("input, select").each(function(){var t=e(this).attr("name"),o=e(this).val();t&&("tag_name"===t?r=o:a[t]=o,e(this).val(""))}),r){e(".product_attributes").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var l=i({action:"woocommerce_add_new_attribute",taxonomy:n,term:r,security:woocommerce_admin_meta_boxes.add_attribute_nonce},a);e.post(woocommerce_admin_meta_boxes.ajax_url,l,function(o){o.error?window.alert(o.error):o.slug&&(t.find("select.attribute_values").append('<option value="'+o.term_id+'" selected="selected">'+o.name+"</option>"),t.find("select.attribute_values").change()),e(".product_attributes").unblock()})}else e(".product_attributes").unblock()}},{key:"AttributeDialog",value:function(){var t=this;e(".product_attributes").on("click","button.wvs_add_new_attribute",function(o){o.preventDefault();var n=e(this).closest(".woocommerce_attribute"),i=n.data("taxonomy"),a=e(this).data("dialog_title");e(".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(){e(".ui-widget-overlay").bind("click",function(){e("#attribute-dialog").dialog("close")})},create:function(){}}).dialog("option","title",a).dialog("option","buttons",[{text:WVSPluginObject.dialog_save,click:function(){t.savingDialog(n,e(this),i),e(this).dialog("close").dialog("destroy")}},{text:WVSPluginObject.dialog_cancel,click:function(){e(this).dialog("close").dialog("destroy")}}]).dialog("open")})}}]),t}()}(jQuery)},function(e,t){},function(e,t){},function(e,t){},function(e,t){}]);
assets/js/frontend.js CHANGED
@@ -1,8 +1,8 @@
1
/*!
2
- * WooCommerce Variation Swatches v1.0.10
3
*
4
* Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
- * Date: 2018-2-22 21:58:19
6
* Released under the GPLv3 license.
7
*/
8
/******/ (function(modules) { // webpackBootstrap
@@ -67,25 +67,25 @@
67
/******/ __webpack_require__.p = "";
68
/******/
69
/******/ // Load entry module and return exports
70
- /******/ return __webpack_require__(__webpack_require__.s = 6);
71
/******/ })
72
/************************************************************************/
73
/******/ ({
74
75
- /***/ 6:
76
/***/ (function(module, exports, __webpack_require__) {
77
78
- module.exports = __webpack_require__(7);
79
80
81
/***/ }),
82
83
- /***/ 7:
84
/***/ (function(module, exports, __webpack_require__) {
85
86
jQuery(function ($) {
87
Promise.resolve().then(function () {
88
- return __webpack_require__(8);
89
}).then(function () {
90
// Init on Ajax Popup :)
91
$(document).on('wc_variation_form', '.variations_form', function () {
@@ -96,7 +96,7 @@ jQuery(function ($) {
96
97
/***/ }),
98
99
- /***/ 8:
100
/***/ (function(module, __webpack_exports__, __webpack_require__) {
101
102
"use strict";
@@ -169,7 +169,10 @@ var WooVariationSwatches = function ($) {
169
if (!obj[attribute_name]) {
170
obj[attribute_name] = [];
171
}
172
- obj[attribute_name].push(variation.attributes[attribute_name]);
173
});
174
175
return obj;
@@ -182,7 +185,8 @@ var WooVariationSwatches = function ($) {
182
183
li.each(function () {
184
var attribute_value = $(this).attr('data-value');
185
- if (!attribute_values.includes(attribute_value)) {
186
$(this).removeClass('selected');
187
$(this).addClass('disabled');
188
}
@@ -306,4 +310,4 @@ var WooVariationSwatches = function ($) {
306
/***/ })
307
308
/******/ });
309
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXRzL2pzL2Zyb250ZW5kLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIDM1ODA0NWMxMWVjNjAzMzhiNWMzIiwid2VicGFjazovLy9zcmMvanMvZnJvbnRlbmQuanMiLCJ3ZWJwYWNrOi8vL3NyYy9qcy9Xb29WYXJpYXRpb25Td2F0Y2hlcy5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyIgXHQvLyBUaGUgbW9kdWxlIGNhY2hlXG4gXHR2YXIgaW5zdGFsbGVkTW9kdWxlcyA9IHt9O1xuXG4gXHQvLyBUaGUgcmVxdWlyZSBmdW5jdGlvblxuIFx0ZnVuY3Rpb24gX193ZWJwYWNrX3JlcXVpcmVfXyhtb2R1bGVJZCkge1xuXG4gXHRcdC8vIENoZWNrIGlmIG1vZHVsZSBpcyBpbiBjYWNoZVxuIFx0XHRpZihpbnN0YWxsZWRNb2R1bGVzW21vZHV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AgICAgICBpbml0KGlzX2FqYXgpIHtcblxuICAgICAgICAgICAgdGhpcy5fZWxlbWVudC5maW5kKCd1bC52YXJpYWJsZS1pdGVtcy13cmFwcGVyJykuZWFjaChmdW5jdGlvbiAoaSwgZWwpIHtcblxuICAgICAgICAgICAgICAgIGxldCBzZWxlY3QgPSAkKHRoaXMpLnNpYmxpbmdzKCdzZWxlY3Qud29vLXZhcmlhdGlvbi1yYXctc2VsZWN0Jyk7XG5cbiAgICAgICAgICAgICAgICAkKHRoaXMpLm9uKCdjbGljaycsICdsaScsIGZ1bmN0aW9uIChlKSB7XG4gICAgICAgICAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICAgICAgZS5zdG9wUHJvcGFnYXRpb24oKTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHZhbHVlID0gJCh0aGlzKS5kYXRhKCd2YWx1ZScpO1xuICAgICAgICAgICAgICAgICAgICBzZWxlY3QudmFsKHZhbHVlKS50cmlnZ2VyKCdjaGFuZ2UnKTtcbiAgICAgICAgICAgICAgICAgICAgc2VsZWN0LnRyaWdnZXIoJ2NsaWNrJyk7XG4gICAgICAgICAgICAgICAgICAgIHNlbGVjdC50cmlnZ2VyKCdmb2N1c2luJyk7XG4gICAgICAgICAgICAgICAgICAgIHNlbGVjdC50cmlnZ2VyKCd0b3VjaHN0YXJ0Jyk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgXy5kZWxheSgoKSA9PiB7XG4gICAgICAgICAgICAgICAgdGhpcy5fZWxlbWVudC50cmlnZ2VyKCd3b29fdmFyaWF0aW9uX3N3YXRjaGVzX2luaXQnLCBbdGhpcywgdGhpcy5wcm9kdWN0X3ZhcmlhdGlvbnNdKVxuICAgICAgICAgICAgfSwgMSlcbiAgICAgICAgfVxuXG4gICAgICAgIGxvYWRlZChpc19hamF4KSB7XG4gICAgICAgICAgICBpZiAoIWlzX2FqYXgpIHtcbiAgICAgICAgICAgICAgICB0aGlzLl9lbGVtZW50Lm9uKCd3b29fdmFyaWF0aW9uX3N3YXRjaGVzX2luaXQnLCBmdW5jdGlvbiAoZXZlbnQsIG9iamVjdCwgcHJvZHVjdF92YXJpYXRpb25zKSB7XG5cbiAgICAgICAgICAgICAgICAgICAgb2JqZWN0Ll9nZW5lcmF0ZWQgPSBwcm9kdWN0X3ZhcmlhdGlvbnMucmVkdWNlKChvYmosIHZhcmlhdGlvbikgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmtleXModmFyaWF0aW9uLmF0dHJpYnV0ZXMpLm1hcCgoYXR0cmlidXRlX25hbWUpID0+IHtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghb2JqW2F0dHJpYnV0ZV9uYW1lXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvYmpbYXR0cmlidXRlX25hbWVdID0gW11cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb2JqW2F0dHJpYnV0ZV9uYW1lXS5wdXNoKHZhcmlhdGlvbi5hdHRyaWJ1dGVzW2F0dHJpYnV0ZV9uYW1lXSlcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXG5cbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvYmo7XG4gICAgICAgICAgICAgICAgICAgIH0sIHt9KVxuXG4gICAgICAgICAgICAgICAgICAgICQodGhpcykuZmluZCgndWwudmFyaWFibGUtaXRlbXMtd3JhcHBlcicpLmVhY2goZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGxpICAgICAgICAgICAgICAgPSAkKHRoaXMpLmZpbmQoJ2xpJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXR0cmlidXRlICAgICAgICA9ICQodGhpcykuZGF0YSgnYXR0cmlidXRlX25hbWUnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhdHRyaWJ1dGVfdmFsdWVzID0gb2JqZWN0Ll9nZW5lcmF0ZWRbYXR0cmlidXRlXTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgbGkuZWFjaChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGF0dHJpYnV0ZV92YWx1ZSA9ICQodGhpcykuYXR0cignZGF0YS12YWx1ZScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghYXR0cmlidXRlX3ZhbHVlcy5pbmNsdWRlcyhhdHRyaWJ1dGVfdmFsdWUpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICQodGhpcykucmVtb3ZlQ2xhc3MoJ3NlbGVjdGVkJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICQodGhpcykuYWRkQ2xhc3MoJ2Rpc2FibGVkJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmVzZXQoaXNfYWpheCkge1xuICAgICAgICAgICAgdGhpcy5fZWxlbWVudC5vbigncmVzZXRfZGF0YScsIGZ1bmN0aW9uIChldmVudCkge1xuICAgICAgICAgICAgICAgIGxldCBpc0FqYXhWYXJpYXRpb24gPSAhJCh0aGlzKS5kYXRhKCdwcm9kdWN0X3ZhcmlhdGlvbnMnKTtcbiAgICAgICAgICAgICAgICAkKHRoaXMpLmZpbmQoJ3VsLnZhcmlhYmxlLWl0ZW1zLXdyYXBwZXInKS5lYWNoKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgbGV0IGxpID0gJCh0aGlzKS5maW5kKCdsaScpO1xuICAgICAgICAgICAgICAgICAgICBsaS5lYWNoKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghaXNfYWpheCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICQodGhpcykucmVtb3ZlQ2xhc3MoJ3NlbGVjdGVkIGRpc2FibGVkJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cblxuICAgICAgICB1cGRhdGUoaXNfYWpheCkge1xuICAgICAgICAgICAgdGhpcy5fZWxlbWVudC5vbignd29vY29tbWVyY2VfdmFyaWF0aW9uX2hhc19jaGFuZ2VkJywgZnVuY3Rpb24gKGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgaWYgKGlzX2FqYXgpIHtcbiAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5maW5kKCd1bC52YXJpYWJsZS1pdGVtcy13cmFwcGVyJykuZWFjaChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgc2VsZWN0ZWQgPSAnJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zICA9ICQodGhpcykuc2libGluZ3MoJ3NlbGVjdC53b28tdmFyaWF0aW9uLXJhdy1zZWxlY3QnKS5maW5kKCdvcHRpb24nKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50ICA9ICQodGhpcykuc2libGluZ3MoJ3NlbGVjdC53b28tdmFyaWF0aW9uLXJhdy1zZWxlY3QnKS5maW5kKCdvcHRpb246c2VsZWN0ZWQnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlcSAgICAgICA9ICQodGhpcykuc2libGluZ3MoJ3NlbGVjdC53b28tdmFyaWF0aW9uLXJhdy1zZWxlY3QnKS5maW5kKCdvcHRpb24nKS5lcSgxKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaSAgICAgICA9ICQodGhpcykuZmluZCgnbGknKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3RzICA9IFtdO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zLmVhY2goZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgkKHRoaXMpLnZhbCgpICE9PSAnJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3RzLnB1c2goJCh0aGlzKS52YWwoKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkID0gY3VycmVudCA/IGN1cnJlbnQudmFsKCkgOiBlcS52YWwoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIF8uZGVsYXkoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpLmVhY2goZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmFsdWUgPSAkKHRoaXMpLmF0dHIoJ2RhdGEtdmFsdWUnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5yZW1vdmVDbGFzcygnc2VsZWN0ZWQgZGlzYWJsZWQnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHZhbHVlID09PSBzZWxlY3RlZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5hZGRDbGFzcygnc2VsZWN0ZWQnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSwgMSk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAvLyBXaXRoT3V0IEFqYXggVXBkYXRlXG4gICAgICAgICAgICB0aGlzLl9lbGVtZW50Lm9uKCd3b29jb21tZXJjZV91cGRhdGVfdmFyaWF0aW9uX3ZhbHVlcycsIGZ1bmN0aW9uIChldmVudCkge1xuICAgICAgICAgICAgICAgICQodGhpcykuZmluZCgndWwudmFyaWFibGUtaXRlbXMtd3JhcHBlcicpLmVhY2goZnVuY3Rpb24gKCkge1xuXG4gICAgICAgICAgICAgICAgICAgIGxldCBzZWxlY3RlZCA9ICcnLFxuICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9ucyAgPSAkKHRoaXMpLnNpYmxpbmdzKCdzZWxlY3Qud29vLXZhcmlhdGlvbi1yYXctc2VsZWN0JykuZmluZCgnb3B0aW9uJyksXG4gICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50ICA9ICQodGhpcykuc2libGluZ3MoJ3NlbGVjdC53b28tdmFyaWF0aW9uLXJhdy1zZWxlY3QnKS5maW5kKCdvcHRpb246c2VsZWN0ZWQnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGVxICAgICAgID0gJCh0aGlzKS5zaWJsaW5ncygnc2VsZWN0Lndvby12YXJpYXRpb24tcmF3LXNlbGVjdCcpLmZpbmQoJ29wdGlvbicpLmVxKDEpLFxuICAgICAgICAgICAgICAgICAgICAgICAgbGkgICAgICAgPSAkKHRoaXMpLmZpbmQoJ2xpJyksXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3RzICA9IFtdO1xuXG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnMuZWFjaChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoJCh0aGlzKS52YWwoKSAhPT0gJycpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3RzLnB1c2goJCh0aGlzKS52YWwoKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWQgPSBjdXJyZW50ID8gY3VycmVudC52YWwoKSA6IGVxLnZhbCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgICAgICBfLmRlbGF5KGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpLmVhY2goZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2YWx1ZSA9ICQodGhpcykuYXR0cignZGF0YS12YWx1ZScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICQodGhpcykucmVtb3ZlQ2xhc3MoJ3NlbGVjdGVkIGRpc2FibGVkJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKF8uY29udGFpbnMoc2VsZWN0cywgdmFsdWUpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICQodGhpcykucmVtb3ZlQ2xhc3MoJ2Rpc2FibGVkJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh2YWx1ZSA9PT0gc2VsZWN0ZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICQodGhpcykuYWRkQ2xhc3MoJ3NlbGVjdGVkJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICQodGhpcykuYWRkQ2xhc3MoJ2Rpc2FibGVkJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIH0sIDEpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiAtLS0tLS0tLS0tLS0tLS0tLS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FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQWpHQTtBQUFBO0FBQUE7QUFvR0E7QUFDQTtBQUNBO0FBQ0E7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFNQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFNQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFwS0E7QUFBQTtBQUFBO0FBeUJBO0FBQ0E7QUFDQTtBQUNBO0FBNUJBO0FBQ0E7QUFEQTtBQUFBO0FBQ0E7QUFzS0E7Ozs7OztBQU1BO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUNBO0FBQ0E7Ozs7QSIsInNvdXJjZVJvb3QiOiIifQ==
1
/*!
2
+ * WooCommerce Variation Swatches v1.0.11
3
*
4
* Author: Emran Ahmed ( emran.bd.08@gmail.com )
5
+ * Date: 2018-2-28 04:08:03
6
* Released under the GPLv3 license.
7
*/
8
/******/ (function(modules) { // webpackBootstrap
67
/******/ __webpack_require__.p = "";
68
/******/
69
/******/ // Load entry module and return exports
70
+ /******/ return __webpack_require__(__webpack_require__.s = 7);
71
/******/ })
72
/************************************************************************/
73
/******/ ({
74
75
+ /***/ 7:
76
/***/ (function(module, exports, __webpack_require__) {
77
78
+ module.exports = __webpack_require__(8);
79
80
81
/***/ }),
82
83
+ /***/ 8:
84
/***/ (function(module, exports, __webpack_require__) {
85
86
jQuery(function ($) {
87
Promise.resolve().then(function () {
88
+ return __webpack_require__(9);
89
}).then(function () {
90
// Init on Ajax Popup :)
91
$(document).on('wc_variation_form', '.variations_form', function () {
96
97
/***/ }),
98
99
+ /***/ 9:
100
/***/ (function(module, __webpack_exports__, __webpack_require__) {
101
102
"use strict";
169
if (!obj[attribute_name]) {
170
obj[attribute_name] = [];
171
}
172
+
173
+ if (variation.attributes[attribute_name]) {
174
+ obj[attribute_name].push(variation.attributes[attribute_name]);
175
+ }
176
});
177
178
return obj;
185
186
li.each(function () {
187
var attribute_value = $(this).attr('data-value');
188
+
189
+ if (!_.isEmpty(attribute_values) && !attribute_values.includes(attribute_value)) {
190
$(this).removeClass('selected');
191
$(this).addClass('disabled');
192
}
310
/***/ })
311
312
/******/ });
313
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXNzZXRzL2pzL2Zyb250ZW5kLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3dlYnBhY2svYm9vdHN0cmFwIDM3YzMyZGFjOGI1ODFjZDQzNzc1Iiwid2VicGFjazovLy9zcmMvanMvZnJvbnRlbmQuanMiLCJ3ZWJwYWNrOi8vL3NyYy9qcy9Xb29WYXJpYXRpb25Td2F0Y2hlcy5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyIgXHQvLyBUaGUgbW9kdWxlIGNhY2hlXG4gXHR2YXIgaW5zdGFsbGVkTW9kdWxlcyA9IHt9O1xuXG4gXHQvLyBUaGUgcmVxdWlyZSBmdW5jdGlvblxuIFx0ZnVuY3Rpb24gX193ZWJwYWNrX3JlcXVpcmVfXyhtb2R1bGVJZCkge1xuXG4gXHRcdC8vIENoZWNrIGlmIG1vZHVsZSBpcyBpbiBjYWNoZVxuIFx0XHRpZihpbnN0YWxsZWRNb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gICAgICAgIH1cblxuICAgICAgICBpbml0KGlzX2FqYXgpIHtcblxuICAgICAgICAgICAgdGhpcy5fZWxlbWVudC5maW5kKCd1bC52YXJpYWJsZS1pdGVtcy13cmFwcGVyJykuZWFjaChmdW5jdGlvbiAoaSwgZWwpIHtcblxuICAgICAgICAgICAgICAgIGxldCBzZWxlY3QgPSAkKHRoaXMpLnNpYmxpbmdzKCdzZWxlY3Qud29vLXZhcmlhdGlvbi1yYXctc2VsZWN0Jyk7XG5cbiAgICAgICAgICAgICAgICAkKHRoaXMpLm9uKCdjbGljaycsICdsaScsIGZ1bmN0aW9uIChlKSB7XG4gICAgICAgICAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcbiAgICAgICAgICAgICAgICAgICAgZS5zdG9wUHJvcGFnYXRpb24oKTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHZhbHVlID0gJCh0aGlzKS5kYXRhKCd2YWx1ZScpO1xuICAgICAgICAgICAgICAgICAgICBzZWxlY3QudmFsKHZhbHVlKS50cmlnZ2VyKCdjaGFuZ2UnKTtcbiAgICAgICAgICAgICAgICAgICAgc2VsZWN0LnRyaWdnZXIoJ2NsaWNrJyk7XG4gICAgICAgICAgICAgICAgICAgIHNlbGVjdC50cmlnZ2VyKCdmb2N1c2luJyk7XG4gICAgICAgICAgICAgICAgICAgIHNlbGVjdC50cmlnZ2VyKCd0b3VjaHN0YXJ0Jyk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgXy5kZWxheSgoKSA9PiB7XG4gICAgICAgICAgICAgICAgdGhpcy5fZWxlbWVudC50cmlnZ2VyKCd3b29fdmFyaWF0aW9uX3N3YXRjaGVzX2luaXQnLCBbdGhpcywgdGhpcy5wcm9kdWN0X3ZhcmlhdGlvbnNdKVxuICAgICAgICAgICAgfSwgMSlcbiAgICAgICAgfVxuXG4gICAgICAgIGxvYWRlZChpc19hamF4KSB7XG4gICAgICAgICAgICBpZiAoIWlzX2FqYXgpIHtcbiAgICAgICAgICAgICAgICB0aGlzLl9lbGVtZW50Lm9uKCd3b29fdmFyaWF0aW9uX3N3YXRjaGVzX2luaXQnLCBmdW5jdGlvbiAoZXZlbnQsIG9iamVjdCwgcHJvZHVjdF92YXJpYXRpb25zKSB7XG5cbiAgICAgICAgICAgICAgICAgICAgb2JqZWN0Ll9nZW5lcmF0ZWQgPSBwcm9kdWN0X3ZhcmlhdGlvbnMucmVkdWNlKChvYmosIHZhcmlhdGlvbikgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmtleXModmFyaWF0aW9uLmF0dHJpYnV0ZXMpLm1hcCgoYXR0cmlidXRlX25hbWUpID0+IHtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghb2JqW2F0dHJpYnV0ZV9uYW1lXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvYmpbYXR0cmlidXRlX25hbWVdID0gW11cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodmFyaWF0aW9uLmF0dHJpYnV0ZXNbYXR0cmlidXRlX25hbWVdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9ialthdHRyaWJ1dGVfbmFtZV0ucHVzaCh2YXJpYXRpb24uYXR0cmlidXRlc1thdHRyaWJ1dGVfbmFtZV0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvYmo7XG4gICAgICAgICAgICAgICAgICAgIH0sIHt9KTtcblxuICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLmZpbmQoJ3VsLnZhcmlhYmxlLWl0ZW1zLXdyYXBwZXInKS5lYWNoKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBsaSAgICAgICAgICAgICAgID0gJCh0aGlzKS5maW5kKCdsaScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGF0dHJpYnV0ZSAgICAgICAgPSAkKHRoaXMpLmRhdGEoJ2F0dHJpYnV0ZV9uYW1lJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXR0cmlidXRlX3ZhbHVlcyA9IG9iamVjdC5fZ2VuZXJhdGVkW2F0dHJpYnV0ZV07XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGxpLmVhY2goZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhdHRyaWJ1dGVfdmFsdWUgPSAkKHRoaXMpLmF0dHIoJ2RhdGEtdmFsdWUnKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghXy5pc0VtcHR5KGF0dHJpYnV0ZV92YWx1ZXMpICYmICFhdHRyaWJ1dGVfdmFsdWVzLmluY2x1ZGVzKGF0dHJpYnV0ZV92YWx1ZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5yZW1vdmVDbGFzcygnc2VsZWN0ZWQnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5hZGRDbGFzcygnZGlzYWJsZWQnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXNldChpc19hamF4KSB7XG4gICAgICAgICAgICB0aGlzLl9lbGVtZW50Lm9uKCdyZXNldF9kYXRhJywgZnVuY3Rpb24gKGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgbGV0IGlzQWpheFZhcmlhdGlvbiA9ICEkKHRoaXMpLmRhdGEoJ3Byb2R1Y3RfdmFyaWF0aW9ucycpO1xuICAgICAgICAgICAgICAgICQodGhpcykuZmluZCgndWwudmFyaWFibGUtaXRlbXMtd3JhcHBlcicpLmVhY2goZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICBsZXQgbGkgPSAkKHRoaXMpLmZpbmQoJ2xpJyk7XG4gICAgICAgICAgICAgICAgICAgIGxpLmVhY2goZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFpc19hamF4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5yZW1vdmVDbGFzcygnc2VsZWN0ZWQgZGlzYWJsZWQnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIHVwZGF0ZShpc19hamF4KSB7XG4gICAgICAgICAgICB0aGlzLl9lbGVtZW50Lm9uKCd3b29jb21tZXJjZV92YXJpYXRpb25faGFzX2NoYW5nZWQnLCBmdW5jdGlvbiAoZXZlbnQpIHtcbiAgICAgICAgICAgICAgICBpZiAoaXNfYWpheCkge1xuICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLmZpbmQoJ3VsLnZhcmlhYmxlLWl0ZW1zLXdyYXBwZXInKS5lYWNoKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzZWxlY3RlZCA9ICcnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbnMgID0gJCh0aGlzKS5zaWJsaW5ncygnc2VsZWN0Lndvby12YXJpYXRpb24tcmF3LXNlbGVjdCcpLmZpbmQoJ29wdGlvbicpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnQgID0gJCh0aGlzKS5zaWJsaW5ncygnc2VsZWN0Lndvby12YXJpYXRpb24tcmF3LXNlbGVjdCcpLmZpbmQoJ29wdGlvbjpzZWxlY3RlZCcpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVxICAgICAgID0gJCh0aGlzKS5zaWJsaW5ncygnc2VsZWN0Lndvby12YXJpYXRpb24tcmF3LXNlbGVjdCcpLmZpbmQoJ29wdGlvbicpLmVxKDEpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpICAgICAgID0gJCh0aGlzKS5maW5kKCdsaScpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdHMgID0gW107XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbnMuZWFjaChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCQodGhpcykudmFsKCkgIT09ICcnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdHMucHVzaCgkKHRoaXMpLnZhbCgpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWQgPSBjdXJyZW50ID8gY3VycmVudC52YWwoKSA6IGVxLnZhbCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgXy5kZWxheShmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGkuZWFjaChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2YWx1ZSA9ICQodGhpcykuYXR0cignZGF0YS12YWx1ZScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLnJlbW92ZUNsYXNzKCdzZWxlY3RlZCBkaXNhYmxlZCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodmFsdWUgPT09IHNlbGVjdGVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLmFkZENsYXNzKCdzZWxlY3RlZCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCAxKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIC8vIFdpdGhPdXQgQWpheCBVcGRhdGVcbiAgICAgICAgICAgIHRoaXMuX2VsZW1lbnQub24oJ3dvb2NvbW1lcmNlX3VwZGF0ZV92YXJpYXRpb25fdmFsdWVzJywgZnVuY3Rpb24gKGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgJCh0aGlzKS5maW5kKCd1bC52YXJpYWJsZS1pdGVtcy13cmFwcGVyJykuZWFjaChmdW5jdGlvbiAoKSB7XG5cbiAgICAgICAgICAgICAgICAgICAgbGV0IHNlbGVjdGVkID0gJycsXG4gICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zICA9ICQodGhpcykuc2libGluZ3MoJ3NlbGVjdC53b28tdmFyaWF0aW9uLXJhdy1zZWxlY3QnKS5maW5kKCdvcHRpb24nKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnQgID0gJCh0aGlzKS5zaWJsaW5ncygnc2VsZWN0Lndvby12YXJpYXRpb24tcmF3LXNlbGVjdCcpLmZpbmQoJ29wdGlvbjpzZWxlY3RlZCcpLFxuICAgICAgICAgICAgICAgICAgICAgICAgZXEgICAgICAgPSAkKHRoaXMpLnNpYmxpbmdzKCdzZWxlY3Qud29vLXZhcmlhdGlvbi1yYXctc2VsZWN0JykuZmluZCgnb3B0aW9uJykuZXEoMSksXG4gICAgICAgICAgICAgICAgICAgICAgICBsaSAgICAgICA9ICQodGhpcykuZmluZCgnbGknKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdHMgID0gW107XG5cbiAgICAgICAgICAgICAgICAgICAgb3B0aW9ucy5lYWNoKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgkKHRoaXMpLnZhbCgpICE9PSAnJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdHMucHVzaCgkKHRoaXMpLnZhbCgpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZCA9IGN1cnJlbnQgPyBjdXJyZW50LnZhbCgpIDogZXEudmFsKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgICAgIF8uZGVsYXkoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGkuZWFjaChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZhbHVlID0gJCh0aGlzKS5hdHRyKCdkYXRhLXZhbHVlJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5yZW1vdmVDbGFzcygnc2VsZWN0ZWQgZGlzYWJsZWQnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXy5jb250YWlucyhzZWxlY3RzLCB2YWx1ZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5yZW1vdmVDbGFzcygnZGlzYWJsZWQnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHZhbHVlID09PSBzZWxlY3RlZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5hZGRDbGFzcygnc2VsZWN0ZWQnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5hZGRDbGFzcygnZG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if(i[n])return i[n].exports;var a=i[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,e),a.l=!0,a.exports}var i={};e.m=t,e.c=i,e.d=function(t,i,n){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:n})},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,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=6)}({6:function(t,e,i){t.exports=i(7)},7:function(t,e,i){jQuery(function(t){Promise.resolve().then(function(){return i(8)}).then(function(){t(document).on("wc_variation_form",".variations_form",function(){t(this).WooVariationSwatches()})})})},8:function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),o=function(t){var e={},i=function(){function i(a,o){n(this,i),this._element=t(a),this._config=t.extend({},e,o),this._generated={},this.product_variations=this._element.data("product_variations"),this.is_ajax_variation=!this.product_variations,this.init(this.is_ajax_variation),this.loaded(this.is_ajax_variation),this.update(this.is_ajax_variation),this.reset(this.is_ajax_variation),t(document).trigger("woo_variation_swatches",[this._element])}return a(i,[{key:"init",value:function(e){var i=this;this._element.find("ul.variable-items-wrapper").each(function(e,i){var n=t(this).siblings("select.woo-variation-raw-select");t(this).on("click","li",function(e){e.preventDefault(),e.stopPropagation();var i=t(this).data("value");n.val(i).trigger("change"),n.trigger("click"),n.trigger("focusin"),n.trigger("touchstart")})}),_.delay(function(){i._element.trigger("woo_variation_swatches_init",[i,i.product_variations])},1)}},{key:"loaded",value:function(e){e||this._element.on("woo_variation_swatches_init",function(e,i,n){i._generated=n.reduce(function(t,e){return Object.keys(e.attributes).map(function(i){t[i]||(t[i]=[]),t[i].push(e.attributes[i])}),t},{}),t(this).find("ul.variable-items-wrapper").each(function(){var e=t(this).find("li"),n=t(this).data("attribute_name"),a=i._generated[n];e.each(function(){var e=t(this).attr("data-value");a.includes(e)||(t(this).removeClass("selected"),t(this).addClass("disabled"))})})})}},{key:"reset",value:function(e){this._element.on("reset_data",function(i){t(this).data("product_variations");t(this).find("ul.variable-items-wrapper").each(function(){t(this).find("li").each(function(){e||t(this).removeClass("selected disabled")})})})}},{key:"update",value:function(e){this._element.on("woocommerce_variation_has_changed",function(i){e&&t(this).find("ul.variable-items-wrapper").each(function(){var e="",i=t(this).siblings("select.woo-variation-raw-select").find("option"),n=t(this).siblings("select.woo-variation-raw-select").find("option:selected"),a=t(this).siblings("select.woo-variation-raw-select").find("option").eq(1),o=t(this).find("li"),s=[];i.each(function(){""!==t(this).val()&&(s.push(t(this).val()),e=n?n.val():a.val())}),_.delay(function(){o.each(function(){var i=t(this).attr("data-value");t(this).removeClass("selected disabled"),i===e&&t(this).addClass("selected")})},1)})}),this._element.on("woocommerce_update_variation_values",function(e){t(this).find("ul.variable-items-wrapper").each(function(){var e="",i=t(this).siblings("select.woo-variation-raw-select").find("option"),n=t(this).siblings("select.woo-variation-raw-select").find("option:selected"),a=t(this).siblings("select.woo-variation-raw-select").find("option").eq(1),o=t(this).find("li"),s=[];i.each(function(){""!==t(this).val()&&(s.push(t(this).val()),e=n?n.val():a.val())}),_.delay(function(){o.each(function(){var i=t(this).attr("data-value");t(this).removeClass("selected disabled"),_.contains(s,i)?(t(this).removeClass("disabled"),i===e&&t(this).addClass("selected")):t(this).addClass("disabled")})},1)})})}}],[{key:"_jQueryInterface",value:function(t){return this.each(function(){new i(this,t)})}}]),i}();return t.fn.WooVariationSwatches=i._jQueryInterface,t.fn.WooVariationSwatches.Constructor=i,t.fn.WooVariationSwatches.noConflict=function(){return t.fn.WooVariationSwatches=t.fn.WooVariationSwatches,i._jQueryInterface},i}(jQuery);e.default=o}});
1
+ !function(t){function e(n){if(i[n])return i[n].exports;var a=i[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,e),a.l=!0,a.exports}var i={};e.m=t,e.c=i,e.d=function(t,i,n){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:n})},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,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=7)}({7:function(t,e,i){t.exports=i(8)},8:function(t,e,i){jQuery(function(t){Promise.resolve().then(function(){return i(9)}).then(function(){t(document).on("wc_variation_form",".variations_form",function(){t(this).WooVariationSwatches()})})})},9:function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),o=function(t){var e={},i=function(){function i(a,o){n(this,i),this._element=t(a),this._config=t.extend({},e,o),this._generated={},this.product_variations=this._element.data("product_variations"),this.is_ajax_variation=!this.product_variations,this.init(this.is_ajax_variation),this.loaded(this.is_ajax_variation),this.update(this.is_ajax_variation),this.reset(this.is_ajax_variation),t(document).trigger("woo_variation_swatches",[this._element])}return a(i,[{key:"init",value:function(e){var i=this;this._element.find("ul.variable-items-wrapper").each(function(e,i){var n=t(this).siblings("select.woo-variation-raw-select");t(this).on("click","li",function(e){e.preventDefault(),e.stopPropagation();var i=t(this).data("value");n.val(i).trigger("change"),n.trigger("click"),n.trigger("focusin"),n.trigger("touchstart")})}),_.delay(function(){i._element.trigger("woo_variation_swatches_init",[i,i.product_variations])},1)}},{key:"loaded",value:function(e){e||this._element.on("woo_variation_swatches_init",function(e,i,n){i._generated=n.reduce(function(t,e){return Object.keys(e.attributes).map(function(i){t[i]||(t[i]=[]),e.attributes[i]&&t[i].push(e.attributes[i])}),t},{}),t(this).find("ul.variable-items-wrapper").each(function(){var e=t(this).find("li"),n=t(this).data("attribute_name"),a=i._generated[n];e.each(function(){var e=t(this).attr("data-value");_.isEmpty(a)||a.includes(e)||(t(this).removeClass("selected"),t(this).addClass("disabled"))})})})}},{key:"reset",value:function(e){this._element.on("reset_data",function(i){t(this).data("product_variations");t(this).find("ul.variable-items-wrapper").each(function(){t(this).find("li").each(function(){e||t(this).removeClass("selected disabled")})})})}},{key:"update",value:function(e){this._element.on("woocommerce_variation_has_changed",function(i){e&&t(this).find("ul.variable-items-wrapper").each(function(){var e="",i=t(this).siblings("select.woo-variation-raw-select").find("option"),n=t(this).siblings("select.woo-variation-raw-select").find("option:selected"),a=t(this).siblings("select.woo-variation-raw-select").find("option").eq(1),o=t(this).find("li"),s=[];i.each(function(){""!==t(this).val()&&(s.push(t(this).val()),e=n?n.val():a.val())}),_.delay(function(){o.each(function(){var i=t(this).attr("data-value");t(this).removeClass("selected disabled"),i===e&&t(this).addClass("selected")})},1)})}),this._element.on("woocommerce_update_variation_values",function(e){t(this).find("ul.variable-items-wrapper").each(function(){var e="",i=t(this).siblings("select.woo-variation-raw-select").find("option"),n=t(this).siblings("select.woo-variation-raw-select").find("option:selected"),a=t(this).siblings("select.woo-variation-raw-select").find("option").eq(1),o=t(this).find("li"),s=[];i.each(function(){""!==t(this).val()&&(s.push(t(this).val()),e=n?n.val():a.val())}),_.delay(function(){o.each(function(){var i=t(this).attr("data-value");t(this).removeClass("selected disabled"),_.contains(s,i)?(t(this).removeClass("disabled"),i===e&&t(this).addClass("selected")):t(this).addClass("disabled")})},1)})})}}],[{key:"_jQueryInterface",value:function(t){return this.each(function(){new i(this,t)})}}]),i}();return t.fn.WooVariationSwatches=i._jQueryInterface,t.fn.WooVariationSwatches.Constructor=i,t.fn.WooVariationSwatches.noConflict=function(){return t.fn.WooVariationSwatches=t.fn.WooVariationSwatches,i._jQueryInterface},i}(jQuery);e.default=o}});
includes/class-wvs-customize-heading.php ADDED
@@ -0,0 +1,63 @@
1
+ <?php
2
+
3
+ defined( 'ABSPATH' ) or die( 'Keep Silent' );
4
+
5
+ /**
6
+ * Example:
7
+ * new WVS_Customize_Heading( $wp_customize, 'section', esc_html__( 'Heading Options', 'text-domain' ) );
8
+ */
9
+
10
+ if ( ! class_exists( 'WVS_Customize_Heading_Control' ) ):
11
+
12
+ class WVS_Customize_Heading_Control extends WP_Customize_Control {
13
+
14
+ public $type = 'wvs-heading';
15
+
16
+ public function __construct( $manager, $id, $args = array() ) {
17
+ parent::__construct( $manager, $id, $args );
18
+ }
19
+
20
+ public function enqueue() {
21
+ $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
22
+ wp_enqueue_style( 'wvs-customize-heading-control', woo_variation_swatches()->assets_uri( "/css/wvs-customize-heading-control$suffix.css" ) );
23
+ }
24
+
25
+ protected function render_content() {
26
+ ?>
27
+ <?php if ( ! empty( $this->label ) ) : ?>
28
+ <h4 class="wvs-customize-heading-control-title"><?php echo esc_html( $this->label ); ?></h4>
29
+ <?php endif;
30
+ }
31
+ }
32
+ endif;
33
+
34
+ if ( ! class_exists( 'WVS_Customize_Heading' ) ):
35
+
36
+ class WVS_Customize_Heading {
37
+
38
+ public function __construct( $wp_customize, $section, $title, $priority = NULL ) {
39
+
40
+ static $customize_heading_control_id = 1;
41
+ $this->add_settings( $wp_customize, $customize_heading_control_id );
42
+ $this->add_controls( $wp_customize, $title, $section, $priority, $customize_heading_control_id );
43
+ $customize_heading_control_id ++;
44
+ }
45
+
46
+ private function add_settings( $wp_customize, $id ) {
47
+
48
+ $wp_customize->add_setting( sprintf( 'wvs-customize-heading-control-%d', $id ), array(
49
+ 'sanitize_callback' => 'sanitize_key'
50
+ ) );
51
+ }
52
+
53
+ private function add_controls( $wp_customize, $title, $section, $priority, $id ) {
54
+
55
+ $wp_customize->add_control( new WVS_Customize_Heading_Control( $wp_customize, sprintf( 'wvs-customize-heading-control-%d', $id ), array(
56
+ 'label' => $title,
57
+ 'section' => $section,
58
+ 'priority' => $priority,
59
+ ) ) );
60
+ }
61
+ }
62
+
63
+ endif;
includes/class-wvs-customizer.php ADDED
@@ -0,0 +1,112 @@
1
+ <?php
2
+
3
+ defined( 'ABSPATH' ) or die( 'Keep Quit' );
4
+
5
+ if ( ! class_exists( 'WVS_Customizer' ) ):
6
+ class WVS_Customizer {
7
+ private $_settings_name;
8
+ private $_fields;
9
+ private $_plugin_class;
10
+ private $_theme_feature_name;
11
+
12
+ public function __construct( $theme_feature_name, $plugin_class, $settings_name, $fields ) {
13
+ $this->_settings_name = $settings_name;
14
+ $this->_fields = $fields;
15
+ $this->_plugin_class = $plugin_class;
16
+ $this->_theme_feature_name = $theme_feature_name;
17
+
18
+ add_action( 'customize_register', array( $this, 'includes' ) );
19
+ add_action( 'customize_register', array( $this, 'add_panel' ) );
20
+ add_action( 'customize_register', array( $this, 'add_section' ) );
21
+ // add_action( 'customize_controls_print_styles', array( $this, 'add_styles' ) );
22
+ // add_action( 'customize_controls_print_scripts', array( $this, 'add_scripts' ), 30 );
23
+ }
24
+
25
+ public function includes() {
26
+ require_once $this->_plugin_class->include_path( 'class-wvs-customize-heading.php' );
27
+ }
28
+
29
+ public function add_panel( $wp_customize ) {
30
+ $wp_customize->add_panel( $this->_settings_name, array(
31
+ 'priority' => 100,
32
+ 'capability' => 'manage_woocommerce',
33
+ 'title' => esc_html__( 'Woo Variation Swatches', 'woo-variation-swatches' ),
34
+ ) );
35
+ }
36
+
37
+ public function add_section( $wp_customize ) {
38
+
39
+ // Theme Support
40
+ $theme_support = FALSE;
41
+ if ( current_theme_supports( $this->_theme_feature_name ) ) {
42
+ $theme_support = get_theme_support( $this->_theme_feature_name );
43
+ }
44
+
45
+ foreach ( $this->_fields as $panel ) {
46
+ $section_id = sprintf( '%s_%s', $this->_settings_name, $panel[ 'id' ] );
47
+
48
+ $wp_customize->add_section( $section_id, array(
49
+ 'title' => $panel[ 'title' ],
50
+ 'panel' => $this->_settings_name,
51
+ ) );
52
+
53
+ foreach ( $panel[ 'sections' ] as $section ) {
54
+
55
+ new WVS_Customize_Heading( $wp_customize, $section_id, $section[ 'title' ] );
56
+
57
+ foreach ( $section[ 'fields' ] as $field ) {
58
+
59
+ $setting_id = sprintf( '%s[%s]', $this->_settings_name, $field[ 'id' ] );
60
+
61
+ $default_value = $field[ 'default' ];
62
+
63
+ // Theme Support
64
+ if ( $theme_support ) {
65
+ $default_value = isset( $theme_support[ 0 ][ $field[ 'id' ] ] ) ? $theme_support[ 0 ][ $field[ 'id' ] ] : $field[ 'default' ];
66
+ }
67
+
68
+ // Add Settings
69
+ $setting_options = array(
70
+ 'default' => $default_value,
71
+ 'type' => 'option',
72
+ 'capability' => 'manage_woocommerce',
73
+ 'sanitize_callback' => 'sanitize_key',
74
+ );
75
+
76
+ switch ( $field[ 'type' ] ) {
77
+ case 'checkbox':
78
+ $setting_options[ 'sanitize_callback' ] = array( $this, 'sanitize_checkbox' );
79
+ break;
80
+ }
81
+
82
+ $wp_customize->add_setting( $setting_id, $setting_options );
83
+
84
+ // Add Control
85
+ $control_options = array(
86
+ 'label' => $field[ 'title' ],
87
+ 'description' => $field[ 'desc' ],
88
+ 'section' => $section_id,
89
+ 'type' => $field[ 'type' ]
90
+ );
91
+
92
+ switch ( $field[ 'type' ] ) {
93
+ case 'radio':
94
+ case 'select':
95
+ $control_options[ 'choices' ] = $field[ 'options' ];
96
+ break;
97
+ }
98
+
99
+ $wp_customize->add_control( $setting_id, $control_options );
100
+
101
+ }
102
+ }
103
+ }
104
+ }
105
+
106
+ function sanitize_checkbox( $value ) {
107
+ $filter = filter_var( $value, FILTER_VALIDATE_BOOLEAN );
108
+
109
+ return is_null( $filter ) ? 0 : $filter;
110
+ }
111
+ }
112
+ endif;
includes/class-wvs-settings-api.php CHANGED
@@ -43,6 +43,8 @@
43
44
add_action( 'admin_footer', array( $this, 'admin_inline_js' ) );
45
46
do_action( 'wvs_setting_api_init', $this );
47
}
48
@@ -159,9 +161,11 @@
159
}
160
161
if ( $is_new ) {
162
- return ( $default[ 'type' ] === 'checkbox' ) ? ( ! ! $default[ 'value' ] ) : $default[ 'value' ];
163
} else {
164
- return ( $default[ 'type' ] === 'checkbox' ) ? ( isset( $options[ $option ] ) ? TRUE : FALSE ) : ( isset( $options[ $option ] ) ? $options[ $option ] : $default[ 'value' ] );
165
}
166
}
167
@@ -171,9 +175,20 @@
171
update_option( $this->settings_name, $options );
172
}
173
174
public function settings_init() {
175
176
- register_setting( $this->settings_name, $this->settings_name );
177
178
foreach ( $this->fields as $tab_key => $tab ) {
179
@@ -246,9 +261,10 @@
246
}
247
248
public function checkbox_field_callback( $args ) {
249
$value = (bool) $this->get_option( $args[ 'id' ] );
250
$size = isset( $args[ 'size' ] ) && ! is_null( $args[ 'size' ] ) ? $args[ 'size' ] : 'regular';
251
- $html = sprintf( '<fieldset><label><input type="checkbox" id="%2$s-field" name="%4$s[%2$s]" value="%3$s" %5$s/> %6$s</label></fieldset>', $size, $args[ 'id' ], $value, $this->settings_name, checked( $value, TRUE, FALSE ), esc_attr( $args[ 'desc' ] ) );
252
253
echo $html;
254
}
43
44
add_action( 'admin_footer', array( $this, 'admin_inline_js' ) );
45
46
+ new WVS_Customizer( $this->theme_feature_name, $this->plugin_class, $this->settings_name, $this->fields );
47
+
48
do_action( 'wvs_setting_api_init', $this );
49
}
50
161
}
162
163
if ( $is_new ) {
164
+ // return ( $default[ 'type' ] === 'checkbox' ) ? ( ! ! $default[ 'value' ] ) : $default[ 'value' ];
165
+ return $default[ 'value' ];
166
} else {
167
+ // return ( $default[ 'type' ] === 'checkbox' ) ? ( isset( $options[ $option ] ) ? TRUE : FALSE ) : ( isset( $options[ $option ] ) ? $options[ $option ] : $default[ 'value' ] );
168
+ return isset( $options[ $option ] ) ? $options[ $option ] : $default[ 'value' ];
169
}
170
}
171
175
update_option( $this->settings_name, $options );
176
}
177
178
+ public function sanitize_callback( $options ) {
179
+
180
+ foreach ( $this->get_defaults() as $opt ) {
181
+ if ( $opt[ 'type' ] === 'checkbox' && ! isset( $options[ $opt[ 'id' ] ] ) ) {
182
+ $options[ $opt[ 'id' ] ] = 0;
183
+ }
184
+ }
185
+
186
+ return $options;
187
+ }
188
+
189
public function settings_init() {
190
191
+ register_setting( $this->settings_name, $this->settings_name, array( $this, 'sanitize_callback' ) );
192
193
foreach ( $this->fields as $tab_key => $tab ) {
194
261
}
262
263
public function checkbox_field_callback( $args ) {
264
+
265
$value = (bool) $this->get_option( $args[ 'id' ] );
266
$size = isset( $args[ 'size' ] ) && ! is_null( $args[ 'size' ] ) ? $args[ 'size' ] : 'regular';
267
+ $html = sprintf( '<fieldset><label><input type="checkbox" id="%2$s-field" name="%4$s[%2$s]" value="%3$s" %5$s/> %6$s</label></fieldset>', $size, $args[ 'id' ], TRUE, $this->settings_name, checked( $value, TRUE, FALSE ), esc_attr( $args[ 'desc' ] ) );
268
269
echo $html;
270
}
includes/class-wvs-term-meta.php CHANGED
@@ -16,7 +16,7 @@
16
$this->fields = $fields;
17
18
// Category/term ordering
19
- //add_action( 'create_term', array( $this, 'create_term' ), 5, 3 );
20
21
add_action( 'delete_term', array( $this, 'delete_term' ), 5, 4 );
22
@@ -28,11 +28,31 @@
28
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
29
30
// Add columns
31
- //add_filter( 'manage_edit-product_cat_columns', array( $this, 'product_cat_columns' ) );
32
- //add_filter( 'manage_product_cat_custom_column', array( $this, 'product_cat_column' ), 10, 3 );
33
34
}
35
36
public function delete_term( $term_id, $tt_id, $taxonomy, $deleted_term ) {
37
global $wpdb;
38
@@ -96,13 +116,17 @@
96
$screen = get_current_screen();
97
98
if ( ( $screen->post_type == $this->post_type ) and ( $screen->taxonomy == $this->taxonomy ) ) {
99
- $this->generate_form_fields( $term );
100
}
101
}
102
103
- private function generate_form_fields( $term ) {
104
105
- $fields = apply_filters( 'wvs_term_meta_fields', $this->fields, $term );
106
107
foreach ( $fields as $field ) {
108
@@ -123,7 +147,7 @@
123
124
$field[ 'dependency' ] = ( isset( $field[ 'dependency' ] ) ) ? $field[ 'dependency' ] : array();
125
126
- $this->field_start( $field, $term );
127
switch ( $field[ 'type' ] ) {
128
case 'text':
129
case 'url':
@@ -186,7 +210,7 @@
186
?>
187
<div class="meta-image-field-wrapper">
188
<div class="image-preview">
189
- <img data-placeholder="<?php echo esc_url( $this->placeholder_img_src() ); ?>" src="<?php echo esc_url( $this->get_img_src( $field[ 'value' ] ) ); ?>" width="60px" height="60px"/>
190
</div>
191
<div class="button-wrapper">
192
<input type="hidden" id="<?php echo $field[ 'id' ] ?>" name="<?php echo $field[ 'id' ] ?>" value="<?php echo esc_attr( $field[ 'value' ] ) ?>"/>
@@ -202,12 +226,12 @@
202
break;
203
204
}
205
- $this->field_end( $field, $term );
206
207
}
208
}
209
210
- private function field_start( $field, $term ) {
211
212
$depends = empty( $field[ 'dependency' ] ) ? '' : "data-depends='" . wp_json_encode( $field[ 'dependency' ] ) . "'";
213
@@ -227,21 +251,21 @@
227
echo ob_get_clean();
228
}
229
230
- public function get_img_src( $thumbnail_id = FALSE ) {
231
if ( ! empty( $thumbnail_id ) ) {
232
$image = wp_get_attachment_thumb_url( $thumbnail_id );
233
} else {
234
- $image = $this->placeholder_img_src();
235
}
236
237
return $image;
238
}
239
240
- public function placeholder_img_src() {
241
return woo_variation_swatches()->images_uri( 'placeholder.png' );
242
}
243
244
- private function field_end( $field, $term ) {
245
246
ob_start();
247
if ( ! $term ) {
16
$this->fields = $fields;
17
18
// Category/term ordering
19
+ // add_action( 'create_term', array( $this, 'create_term' ), 5, 3 );
20
21
add_action( 'delete_term', array( $this, 'delete_term' ), 5, 4 );
22
28
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
29
30
// Add columns
31
+ add_filter( "manage_edit-{$this->taxonomy}_columns", array( $this, 'taxonomy_columns' ) );
32
+ add_filter( "manage_{$this->taxonomy}_custom_column", array( $this, 'taxonomy_column' ), 10, 3 );
33
34
}
35
36
+ public function taxonomy_columns( $columns ) {
37
+ $new_columns = array();
38
+ $new_columns[ 'cb' ] = $columns[ 'cb' ];
39
+ $new_columns[ 'wvs-meta-preview' ] = '';
40
+ unset( $columns[ 'cb' ] );
41
+
42
+ return array_merge( $new_columns, $columns );
43
+ }
44
+
45
+ public function taxonomy_column( $columns, $column, $term_id ) {
46
+
47
+ $attribute = wvs_get_wc_attribute_taxonomy( $this->taxonomy );
48
+ $fields = wvs_taxonomy_meta_fields( $attribute->attribute_type );
49
+ $available_types = wvs_available_attributes_types( $attribute->attribute_type );
50
+
51
+ if ( is_callable( $available_types[ 'preview' ] ) ) {
52
+ call_user_func( $available_types[ 'preview' ], $term_id, $attribute, $fields );
53
+ }
54
+ }
55
+
56
public function delete_term( $term_id, $tt_id, $taxonomy, $deleted_term ) {
57
global $wpdb;
58
116
$screen = get_current_screen();
117
118
if ( ( $screen->post_type == $this->post_type ) and ( $screen->taxonomy == $this->taxonomy ) ) {
119
+ self::generate_form_fields( $this->fields, $term );
120
}
121
}
122
123
+ public static function generate_form_fields( $fields, $term ) {
124
125
+ $fields = apply_filters( 'wvs_term_meta_fields', $fields, $term );
126
+
127
+ if ( empty( $fields ) ) {
128
+ return;
129
+ }
130
131
foreach ( $fields as $field ) {
132
147
148
$field[ 'dependency' ] = ( isset( $field[ 'dependency' ] ) ) ? $field[ 'dependency' ] : array();
149
150
+ self::field_start( $field, $term );
151
switch ( $field[ 'type' ] ) {
152
case 'text':
153
case 'url':
210
?>
211
<div class="meta-image-field-wrapper">
212
<div class="image-preview">
213
+ <img data-placeholder="<?php echo esc_url( self::placeholder_img_src() ); ?>" src="<?php echo esc_url( self::get_img_src( $field[ 'value' ] ) ); ?>" width="60px" height="60px"/>
214
</div>
215
<div class="button-wrapper">
216
<input type="hidden" id="<?php echo $field[ 'id' ] ?>" name="<?php echo $field[ 'id' ] ?>" value="<?php echo esc_attr( $field[ 'value' ] ) ?>"/>
226
break;
227
228
}
229
+ self::field_end( $field, $term );
230
231
}
232
}
233
234
+ private static function field_start( $field, $term ) {
235
236
$depends = empty( $field[ 'dependency' ] ) ? '' : "data-depends='" . wp_json_encode( $field[ 'dependency' ] ) . "'";
237
251
echo ob_get_clean();
252
}
253
254
+ private static function get_img_src( $thumbnail_id = FALSE ) {
255
if ( ! empty( $thumbnail_id ) ) {
256
$image = wp_get_attachment_thumb_url( $thumbnail_id );
257
} else {
258
+ $image = self::placeholder_img_src();
259
}
260
261
return $image;
262
}
263
264
+ private static function placeholder_img_src() {
265
return woo_variation_swatches()->images_uri( 'placeholder.png' );
266
}
267
268
+ private static function field_end( $field, $term ) {
269
270
ob_start();
271
if ( ! $term ) {
includes/functions.php CHANGED
@@ -7,25 +7,63 @@
7
//-------------------------------------------------------------------------------
8
9
if ( ! function_exists( 'wvs_available_attributes_types' ) ):
10
- function wvs_available_attributes_types() {
11
$types = array();
12
13
$types[ 'color' ] = array(
14
- 'title' => esc_html__( 'Color', 'woo-variation-swatches' ),
15
- 'output' => 'wvs_color_variation_attribute_options'
16
);
17
18
$types[ 'image' ] = array(
19
- 'title' => esc_html__( 'Image', 'woo-variation-swatches' ),
20
- 'output' => 'wvs_image_variation_attribute_options'
21
);
22
23
$types[ 'button' ] = array(
24
- 'title' => esc_html__( 'Button', 'woo-variation-swatches' ),
25
- 'output' => 'wvs_button_variation_attribute_options'
26
);
27
28
- return apply_filters( 'wvs_available_attributes_types', $types );
29
}
30
endif;
31
@@ -114,12 +152,12 @@
114
endif;
115
116
//-------------------------------------------------------------------------------
117
- // Add WooCommerce taxonomy Meta
118
//-------------------------------------------------------------------------------
119
120
- if ( ! function_exists( 'wvs_add_product_taxonomy_meta' ) ) {
121
-
122
- function wvs_add_product_taxonomy_meta() {
123
$fields = array();
124
125
$fields[ 'color' ] = array(
@@ -140,7 +178,26 @@
140
)
141
);
142
143
- $fields = apply_filters( 'wvs_product_taxonomy_meta_fields', $fields );
144
$meta_added_for = apply_filters( 'wvs_product_taxonomy_meta_for', array( 'color', 'image' ) );
145
146
if ( function_exists( 'wc_get_attribute_taxonomies' ) ):
@@ -187,10 +244,19 @@
187
endif;
188
?>
189
</select>
190
<button class="button plus select_all_attributes"><?php esc_html_e( 'Select all', 'woo-variation-swatches' ); ?></button>
191
<button class="button minus select_no_attributes"><?php esc_html_e( 'Select none', 'woo-variation-swatches' ); ?></button>
192
- <button class="button fr plus add_new_attribute"><?php esc_html_e( 'Add new', 'woo-variation-swatches' ); ?></button>
193
<?php
194
}
195
}
196
endif;
7
//-------------------------------------------------------------------------------
8
9
if ( ! function_exists( 'wvs_available_attributes_types' ) ):
10
+ function wvs_available_attributes_types( $type = FALSE ) {
11
$types = array();
12
13
$types[ 'color' ] = array(
14
+ 'title' => esc_html__( 'Color', 'woo-variation-swatches' ),
15
+ 'output' => 'wvs_color_variation_attribute_options',
16
+ 'preview' => 'wvs_color_variation_attribute_preview'
17
);
18
19
$types[ 'image' ] = array(
20
+ 'title' => esc_html__( 'Image', 'woo-variation-swatches' ),
21
+ 'output' => 'wvs_image_variation_attribute_options',
22
+ 'preview' => 'wvs_image_variation_attribute_preview'
23
);
24
25
$types[ 'button' ] = array(
26
+ 'title' => esc_html__( 'Button', 'woo-variation-swatches' ),
27
+ 'output' => 'wvs_button_variation_attribute_options',
28
+ 'preview' => 'wvs_button_variation_attribute_preview'
29
);
30
31
+ $types = apply_filters( 'wvs_available_attributes_types', $types );
32
+
33
+ if ( $type ) {
34
+ return isset( $types[ $type ] ) ? $types[ $type ] : array();
35
+ }
36
+
37
+ return $types;
38
+ }
39
+ endif;
40
+
41
+ //-------------------------------------------------------------------------------
42
+ // Color Variation Preview
43
+ //-------------------------------------------------------------------------------
44
+
45
+ if ( ! function_exists( 'wvs_color_variation_attribute_preview' ) ):
46
+ function wvs_color_variation_attribute_preview( $term_id, $attribute, $fields ) {
47
+
48
+ $key = $fields[ 0 ][ 'id' ];
49
+ $value = sanitize_hex_color( get_term_meta( $term_id, $key, TRUE ) );
50
+
51
+ printf( '<div class="wvs-preview wvs-color-preview" style="background-color:%s;"></div>', esc_attr( $value ) );
52
+ }
53
+ endif;
54
+
55
+ //-------------------------------------------------------------------------------
56
+ // Image Variation Preview
57
+ //-------------------------------------------------------------------------------
58
+
59
+ if ( ! function_exists( 'wvs_image_variation_attribute_preview' ) ):
60
+ function wvs_image_variation_attribute_preview( $term_id, $attribute, $fields ) {
61
+
62
+ $key = $fields[ 0 ][ 'id' ];
63
+ $attachment_id = absint( get_term_meta( $term_id, $key, TRUE ) );
64
+ $image = wp_get_attachment_image_url( $attachment_id );
65
+
66
+ printf( '<img src="%s" class="wvs-preview wvs-image-preview" />', esc_url( $image ) );
67
}
68
endif;
69
152
endif;
153
154
//-------------------------------------------------------------------------------
155
+ // WooCommerce taxonomy Meta Field Settings
156
//-------------------------------------------------------------------------------
157
158
+ if ( ! function_exists( 'wvs_taxonomy_meta_fields' ) ):
159
+ function wvs_taxonomy_meta_fields( $field_id = FALSE ) {
160
+
161
$fields = array();
162
163
$fields[ 'color' ] = array(
178
)
179
);
180
181
+ $fields = apply_filters( 'wvs_product_taxonomy_meta_fields', $fields );
182
+
183
+ if ( $field_id ) {
184
+ return isset( $fields[ $field_id ] ) ? $fields[ $field_id ] : array();
185
+ }
186
+
187
+ return $fields;
188
+
189
+ }
190
+ endif;
191
+
192
+ //-------------------------------------------------------------------------------
193
+ // Add WooCommerce taxonomy Meta
194
+ //-------------------------------------------------------------------------------
195
+
196
+ if ( ! function_exists( 'wvs_add_product_taxonomy_meta' ) ) {
197
+
198
+ function wvs_add_product_taxonomy_meta() {
199
+
200
+ $fields = wvs_taxonomy_meta_fields();
201
$meta_added_for = apply_filters( 'wvs_product_taxonomy_meta_for', array( 'color', 'image' ) );
202
203
if ( function_exists( 'wc_get_attribute_taxonomies' ) ):
244
endif;
245
?>
246
</select>
247
+ <?php do_action( 'before_wvs_product_option_terms_button', $tax, $taxonomy ); ?>
248
<button class="button plus select_all_attributes"><?php esc_html_e( 'Select all', 'woo-variation-swatches' ); ?></button>
249
<button class="button minus select_no_attributes"><?php esc_html_e( 'Select none', 'woo-variation-swatches' ); ?></button>
250
+
251
+ <?php
252
+ $fields = wvs_taxonomy_meta_fields( $tax->attribute_type );
253
+ if ( ! empty( $fields ) ): ?>
254
+ <button class="button fr plus wvs_add_new_attribute" data-dialog_title="<?php printf( esc_html__( 'Add new %s', 'woo-variation-swatches' ), esc_attr( $tax->attribute_label ) ) ?>"><?php esc_html_e( 'Add new', 'woo-variation-swatches' ); ?></button>
255
+ <?php else: ?>
256
+ <button class="button fr plus add_new_attribute"><?php esc_html_e( 'Add new', 'woo-variation-swatches' ); ?></button>
257
+ <?php endif; ?>
258
<?php
259
+ do_action( 'after_wvs_product_option_terms_button', $tax, $taxonomy );
260
}
261
}
262
endif;
languages/woo-variation-swatches.pot CHANGED
@@ -16,162 +16,182 @@ msgstr ""
16
"X-Poedit-SourceCharset: UTF-8\n"
17
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
19
- #: ../includes/class-wvs-settings-api.php:78
20
msgid "Woo Variation Swatches Settings"
21
msgstr ""
22
23
- #: ../includes/class-wvs-settings-api.php:79, ../includes/class-wvs-settings-api.php:92
24
msgid "Swatches Settings"
25
msgstr ""
26
27
- #: ../includes/class-wvs-settings-api.php:112
28
msgid "Settings"
29
msgstr ""
30
31
- #: ../includes/class-wvs-term-meta.php:193
32
msgid "Upload / Add image"
33
msgstr ""
34
35
- #: ../includes/class-wvs-term-meta.php:194
36
msgid "Remove image"
37
msgstr ""
38
39
- #: ../includes/functions.php:14, ../includes/functions.php:127
40
msgid "Color"
41
msgstr ""
42
43
- #: ../includes/functions.php:19, ../includes/functions.php:136
44
msgid "Image"
45
msgstr ""
46
47
- #: ../includes/functions.php:24
48
msgid "Button"
49
msgstr ""
50
51
- #: ../includes/functions.php:69
52
msgid "General"
53
msgstr ""
54
55
- #: ../includes/functions.php:71
56
msgid "Display Section"
57
msgstr ""
58
59
- #: ../includes/functions.php:72
60
msgid "Simply change some visual styles"
61
msgstr ""
62
63
- #: ../includes/functions.php:77
64
msgid "Enable Tooltip"
65
msgstr ""
66
67
- #: ../includes/functions.php:78
68
msgid "Enable / Disable plugin default tooltip on each product attribute."
69
msgstr ""
70
71
- #: ../includes/functions.php:84
72
msgid "Enable Stylesheet"
73
msgstr ""
74
75
- #: ../includes/functions.php:85
76
msgid "Enable / Disable plugin default stylesheet"
77
msgstr ""
78
79
- #: ../includes/functions.php:91
80
msgid "Ajax variation threshold"
81
msgstr ""
82
83
- #: ../includes/functions.php:92
84
msgid "Control the number of enable ajax variation threshold, If you set <code>1</code> all product variation will be load via ajax. Default value is <code>30</code>"
85
msgstr ""
86
87
- #: ../includes/functions.php:100
88
msgid "Shape style"
89
msgstr ""
90
91
- #: ../includes/functions.php:101
92
msgid "Attribute Shape Style"
93
msgstr ""
94
95
- #: ../includes/functions.php:103
96
msgid "Rounded Shape"
97
msgstr ""
98
99
- #: ../includes/functions.php:104
100
msgid "Squared Shape"
101
msgstr ""
102
103
- #: ../includes/functions.php:128
104
msgid "Choose a color"
105
msgstr ""
106
107
- #: ../includes/functions.php:137, ../woo-variation-swatches.php:129
108
msgid "Choose an Image"
109
msgstr ""
110
111
- #: ../includes/functions.php:180
112
msgid "Select terms"
113
msgstr ""
114
115
- #: ../includes/functions.php:190
116
msgid "Select all"
117
msgstr ""
118
119
- #: ../includes/functions.php:191
120
msgid "Select none"
121
msgstr ""
122
123
- #: ../includes/functions.php:192
124
msgid "Add new"
125
msgstr ""
126
127
- #: ../includes/functions.php:266, ../includes/functions.php:339, ../includes/functions.php:413
128
msgid "Choose an option"
129
msgstr ""
130
131
- #: ../woo-variation-swatches.php:130
132
msgid "Use Image"
133
msgstr ""
134
135
- #: ../woo-variation-swatches.php:131
136
msgid "Add Media"
137
msgstr ""
138
139
- #: ../woo-variation-swatches.php:186
140
msgid "View Documentation"
141
msgstr ""
142
143
- #: ../woo-variation-swatches.php:186
144
msgid "Documentation"
145
msgstr ""
146
147
- #: ../woo-variation-swatches.php:187, ../woo-variation-swatches.php:187
148
msgid "Support"
149
msgstr ""
150
151
- #: ../woo-variation-swatches.php:188
152
msgid "Review"
153
msgstr ""
154
155
- #: ../woo-variation-swatches.php:188
156
msgid "Please Rate Us"
157
msgstr ""
158
159
- #: ../woo-variation-swatches.php:218
160
msgid "Please check PHP version requirement."
161
msgstr ""
162
163
- #: ../woo-variation-swatches.php:220
164
msgid "It's required to use latest version of PHP to use <strong>WooCommerce Variation Swatches</strong>."
165
msgstr ""
166
167
- #: ../woo-variation-swatches.php:230
168
msgid "WooCommerce"
169
msgstr ""
170
171
- #: ../woo-variation-swatches.php:232
172
msgid "<strong>WooCommerce Variation Swatches</strong> is an add-on of "
173
msgstr ""
174
175
- #: ../woo-variation-swatches.php:328
176
msgid "WooCommerce Variation Swatches Plugin try to load \"%s\" but template \"%s\" was not found."
177
msgstr ""
16
"X-Poedit-SourceCharset: UTF-8\n"
17
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
19
+ #: ../includes/class-wvs-customizer.php:33
20
+ msgid "Woo Variation Swatches"
21
+ msgstr ""
22
+
23
+ #: ../includes/class-wvs-settings-api.php:80
24
msgid "Woo Variation Swatches Settings"
25
msgstr ""
26
27
+ #: ../includes/class-wvs-settings-api.php:81, ../includes/class-wvs-settings-api.php:94
28
msgid "Swatches Settings"
29
msgstr ""
30
31
+ #: ../includes/class-wvs-settings-api.php:114
32
msgid "Settings"
33
msgstr ""
34
35
+ #: ../includes/class-wvs-term-meta.php:217
36
msgid "Upload / Add image"
37
msgstr ""
38
39
+ #: ../includes/class-wvs-term-meta.php:218
40
msgid "Remove image"
41
msgstr ""
42
43
+ #: ../includes/functions.php:14, ../includes/functions.php:165
44
msgid "Color"
45
msgstr ""
46
47
+ #: ../includes/functions.php:20, ../includes/functions.php:174
48
msgid "Image"
49
msgstr ""
50
51
+ #: ../includes/functions.php:26
52
msgid "Button"
53
msgstr ""
54
55
+ #: ../includes/functions.php:107
56
msgid "General"
57
msgstr ""
58
59
+ #: ../includes/functions.php:109
60
msgid "Display Section"
61
msgstr ""
62
63
+ #: ../includes/functions.php:110
64
msgid "Simply change some visual styles"
65
msgstr ""
66
67
+ #: ../includes/functions.php:115
68
msgid "Enable Tooltip"
69
msgstr ""
70
71
+ #: ../includes/functions.php:116
72
msgid "Enable / Disable plugin default tooltip on each product attribute."
73
msgstr ""
74
75
+ #: ../includes/functions.php:122
76
msgid "Enable Stylesheet"
77
msgstr ""
78
79
+ #: ../includes/functions.php:123
80
msgid "Enable / Disable plugin default stylesheet"
81
msgstr ""
82
83
+ #: ../includes/functions.php:129
84
msgid "Ajax variation threshold"
85
msgstr ""
86
87
+ #: ../includes/functions.php:130
88
msgid "Control the number of enable ajax variation threshold, If you set <code>1</code> all product variation will be load via ajax. Default value is <code>30</code>"
89
msgstr ""
90
91
+ #: ../includes/functions.php:138
92
msgid "Shape style"
93
msgstr ""
94
95
+ #: ../includes/functions.php:139
96
msgid "Attribute Shape Style"
97
msgstr ""
98
99
+ #: ../includes/functions.php:141
100
msgid "Rounded Shape"
101
msgstr ""
102
103
+ #: ../includes/functions.php:142
104
msgid "Squared Shape"
105
msgstr ""
106
107
+ #: ../includes/functions.php:166
108
msgid "Choose a color"
109
msgstr ""
110
111
+ #: ../includes/functions.php:175, ../woo-variation-swatches.php:156
112
msgid "Choose an Image"
113
msgstr ""
114
115
+ #: ../includes/functions.php:237
116
msgid "Select terms"
117
msgstr ""
118
119
+ #: ../includes/functions.php:248
120
msgid "Select all"
121
msgstr ""
122
123
+ #: ../includes/functions.php:249
124
msgid "Select none"
125
msgstr ""
126
127
+ #: ../includes/functions.php:254
128
+ msgid "Add new %s"
129
+ msgstr ""
130
+
131
+ #: ../includes/functions.php:254, ../includes/functions.php:256
132
msgid "Add new"
133
msgstr ""
134
135
+ #: ../includes/functions.php:332, ../includes/functions.php:405, ../includes/functions.php:479
136
msgid "Choose an option"
137
msgstr ""
138
139
+ #: ../woo-variation-swatches.php:157
140
+ msgid "Add Attribute"
141
+ msgstr ""
142
+
143
+ #: ../woo-variation-swatches.php:158
144
+ msgid "Add"
145
+ msgstr ""
146
+
147
+ #: ../woo-variation-swatches.php:159
148
+ msgid "Cancel"
149
+ msgstr ""
150
+
151
+ #: ../woo-variation-swatches.php:160
152
msgid "Use Image"
153
msgstr ""
154
155
+ #: ../woo-variation-swatches.php:161
156
msgid "Add Media"
157
msgstr ""
158
159
+ #: ../woo-variation-swatches.php:216
160
msgid "View Documentation"
161
msgstr ""
162
163
+ #: ../woo-variation-swatches.php:216
164
msgid "Documentation"
165
msgstr ""
166
167
+ #: ../woo-variation-swatches.php:217, ../woo-variation-swatches.php:217
168
msgid "Support"
169
msgstr ""
170
171
+ #: ../woo-variation-swatches.php:218
172
msgid "Review"
173
msgstr ""
174
175
+ #: ../woo-variation-swatches.php:218
176
msgid "Please Rate Us"
177
msgstr ""
178
179
+ #: ../woo-variation-swatches.php:248
180
msgid "Please check PHP version requirement."
181
msgstr ""
182
183
+ #: ../woo-variation-swatches.php:250
184
msgid "It's required to use latest version of PHP to use <strong>WooCommerce Variation Swatches</strong>."
185
msgstr ""
186
187
+ #: ../woo-variation-swatches.php:260
188
msgid "WooCommerce"
189
msgstr ""
190
191
+ #: ../woo-variation-swatches.php:262
192
msgid "<strong>WooCommerce Variation Swatches</strong> is an add-on of "
193
msgstr ""
194
195
+ #: ../woo-variation-swatches.php:358
196
msgid "WooCommerce Variation Swatches Plugin try to load \"%s\" but template \"%s\" was not found."
197
msgstr ""
package.json CHANGED
@@ -1,7 +1,7 @@
1
{
2
"package": "WooCommerce Variation Swatches",
3
"name": "woo-variation-swatches",
4
- "version": "1.0.10",
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": "WooCommerce Variation Swatches",
3
"name": "woo-variation-swatches",
4
+ "version": "1.0.11",
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 : "WooCommerce Variation Swatches v1.0.10 \n\nAuthor: Emran Ahmed ( emran.bd.08@gmail.com ) \nDate: " + new Date().toLocaleString() + "\nReleased under the GPLv3 license."
65
});
66
67
mix.notification({
@@ -79,3 +79,4 @@ mix.babel(`src/js/FormFieldDependency.js`, `assets/js/form-field-dependency${min
79
mix.sass(`src/scss/backend.scss`, `assets/css/admin${min}.css`);
80
mix.sass(`src/scss/frontend.scss`, `assets/css/frontend${min}.css`);
81
mix.sass(`src/scss/tooltip.scss`, `assets/css/frontend-tooltip${min}.css`);
61
}
62
63
mix.banner({
64
+ banner : "WooCommerce Variation Swatches v1.0.11 \n\nAuthor: Emran Ahmed ( emran.bd.08@gmail.com ) \nDate: " + new Date().toLocaleString() + "\nReleased under the GPLv3 license."
65
});
66
67
mix.notification({
79
mix.sass(`src/scss/backend.scss`, `assets/css/admin${min}.css`);
80
mix.sass(`src/scss/frontend.scss`, `assets/css/frontend${min}.css`);
81
mix.sass(`src/scss/tooltip.scss`, `assets/css/frontend-tooltip${min}.css`);
82
+ mix.sass(`src/scss/customize-heading-control.scss`, `assets/css/wvs-customize-heading-control${min}.css`);
woo-variation-swatches.php CHANGED
@@ -4,12 +4,12 @@
4
* Plugin URI: https://wordpress.org/plugins/woo-variation-swatches/
5
* Description: WooCommerce Product Variation Swatches
6
* Author: Emran Ahmed
7
- * Version: 1.0.10
8
* Domain Path: /languages
9
* Requires at least: 4.8
10
* Tested up to: 4.9
11
- * WC requires at least: 3.2.0
12
- * WC tested up to: 3.2.6
13
* Text Domain: woo-variation-swatches
14
* Author URI: https://getwooplugins.com/
15
*/
@@ -58,6 +58,7 @@
58
59
public function includes() {
60
if ( $this->is_required_php_version() ) {
61
require_once $this->include_path( 'class-wvs-settings-api.php' );
62
require_once $this->include_path( 'class-wvs-term-meta.php' );
63
require_once $this->include_path( 'functions.php' );
@@ -88,9 +89,31 @@
88
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
89
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
90
add_filter( 'body_class', array( $this, 'body_class' ) );
91
}
92
}
93
94
public function body_class( $classes ) {
95
array_push( $classes, 'woo-variation-swatches' );
96
if ( wp_is_mobile() ) {
@@ -118,19 +141,26 @@
118
119
public function admin_enqueue_scripts() {
120
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
121
wp_enqueue_script( 'form-field-dependency', $this->assets_uri( "/js/form-field-dependency{$suffix}.js" ), array( 'jquery' ), $this->version(), TRUE );
122
wp_enqueue_script( 'woo-variation-swatches-admin', $this->assets_uri( "/js/admin{$suffix}.js" ), array( 'jquery' ), $this->version(), TRUE );
123
wp_enqueue_style( 'woo-variation-swatches-admin', $this->assets_uri( "/css/admin{$suffix}.css" ), array(), $this->version() );
124
125
// wp_enqueue_script( 'selectWoo' );
126
// wp_enqueue_style( 'select2' );
127
128
wp_localize_script( 'woo-variation-swatches-admin', 'WVSPluginObject', array(
129
- 'media_title' => esc_html__( 'Choose an Image', 'woo-variation-swatches' ),
130
- 'button_title' => esc_html__( 'Use Image', 'woo-variation-swatches' ),
131
- 'add_media' => esc_html__( 'Add Media', 'woo-variation-swatches' ),
132
- 'ajaxurl' => esc_url( admin_url( 'admin-ajax.php', 'relative' ) ),
133
- 'nonce' => wp_create_nonce( 'wvs_plugin_nonce' ),
134
) );
135
}
136
4
* Plugin URI: https://wordpress.org/plugins/woo-variation-swatches/
5
* Description: WooCommerce Product Variation Swatches
6
* Author: Emran Ahmed
7
+ * Version: 1.0.11
8
* Domain Path: /languages
9
* Requires at least: 4.8
10
* Tested up to: 4.9
11
+ * WC requires at least: 3.2
12
+ * WC tested up to: 3.3
13
* Text Domain: woo-variation-swatches
14
* Author URI: https://getwooplugins.com/
15
*/
58
59
public function includes() {
60
if ( $this->is_required_php_version() ) {
61
+ require_once $this->include_path( 'class-wvs-customizer.php' );
62
require_once $this->include_path( 'class-wvs-settings-api.php' );
63
require_once $this->include_path( 'class-wvs-term-meta.php' );
64
require_once $this->include_path( 'functions.php' );
89
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
90
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
91
add_filter( 'body_class', array( $this, 'body_class' ) );
92
+
93
+ add_action( 'after_wvs_product_option_terms_button', array( $this, 'add_product_attribute_dialog' ), 10, 2 );
94
}
95
}
96
97
+ // dialog_title
98
+ public function add_product_attribute_dialog( $tax, $taxonomy ) {
99
+
100
+ // from /wp-admin/edit-tags.php
101
+ ?>
102
+ <div class="wvs-attribute-dialog hidden wvs-attribute-dialog-for-<?php echo esc_attr( $taxonomy ) ?>" style="max-width:500px">
103
+ <div class="form-field form-required term-name-wrap">
104
+ <label for="tag-name-for-<?php echo esc_attr( $taxonomy ) ?>"><?php _ex( 'Name', 'term name' ); ?></label>
105
+ <input name="tag_name" required id="tag-name-for-<?php echo esc_attr( $taxonomy ) ?>" type="text" value="" size="40" aria-required="true"/>
106
+ <p><?php _e( 'The name is how it appears on your site.' ); ?></p>
107
+ </div>
108
+
109
+ <?php
110
+ $fields = wvs_taxonomy_meta_fields( $tax->attribute_type );
111
+ WVS_Term_Meta::generate_form_fields( $fields, FALSE );
112
+ ?>
113
+ </div>
114
+ <?php
115
+ }
116
+
117
public function body_class( $classes ) {
118
array_push( $classes, 'woo-variation-swatches' );
119
if ( wp_is_mobile() ) {
141
142
public function admin_enqueue_scripts() {
143
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
144
+
145
+ wp_enqueue_script( 'jquery-ui-dialog' );
146
+
147
wp_enqueue_script( 'form-field-dependency', $this->assets_uri( "/js/form-field-dependency{$suffix}.js" ), array( 'jquery' ), $this->version(), TRUE );
148
wp_enqueue_script( 'woo-variation-swatches-admin', $this->assets_uri( "/js/admin{$suffix}.js" ), array( 'jquery' ), $this->version(), TRUE );
149
wp_enqueue_style( 'woo-variation-swatches-admin', $this->assets_uri( "/css/admin{$suffix}.css" ), array(), $this->version() );
150
151
+
152
// wp_enqueue_script( 'selectWoo' );
153
// wp_enqueue_style( 'select2' );
154
155
wp_localize_script( 'woo-variation-swatches-admin', 'WVSPluginObject', array(
156
+ 'media_title' => esc_html__( 'Choose an Image', 'woo-variation-swatches' ),
157
+ 'dialog_title' => esc_html__( 'Add Attribute', 'woo-variation-swatches' ),
158
+ 'dialog_save' => esc_html__( 'Add', 'woo-variation-swatches' ),
159
+ 'dialog_cancel' => esc_html__( 'Cancel', 'woo-variation-swatches' ),
160
+ 'button_title' => esc_html__( 'Use Image', 'woo-variation-swatches' ),
161
+ 'add_media' => esc_html__( 'Add Media', 'woo-variation-swatches' ),
162
+ 'ajaxurl' => esc_url( admin_url( 'admin-ajax.php', 'relative' ) ),
163
+ 'nonce' => wp_create_nonce( 'wvs_plugin_nonce' ),
164
) );
165
}
166