Changeset 2653659
- Timestamp:
- 01/06/2022 04:00:37 PM (4 years ago)
- Location:
- variation-swatches-for-woocommerce
- Files:
-
- 22 edited
- 1 copied
-
tags/2.1.3 (copied) (copied from variation-swatches-for-woocommerce/trunk)
-
tags/2.1.3/assets/css/admin.css (modified) (2 diffs)
-
tags/2.1.3/assets/css/admin.css.map (modified) (1 diff)
-
tags/2.1.3/assets/css/admin.scss (modified) (2 diffs)
-
tags/2.1.3/assets/js/frontend.js (modified) (5 diffs)
-
tags/2.1.3/includes/class-frontend.php (modified) (14 diffs)
-
tags/2.1.3/includes/class-setting-fields-manager.php (modified) (35 diffs)
-
tags/2.1.3/includes/class-setting-fields-renderer.php (modified) (3 diffs)
-
tags/2.1.3/includes/class-variation-swatches.php (modified) (5 diffs)
-
tags/2.1.3/readme.txt (modified) (3 diffs)
-
tags/2.1.3/templates/admin/welcome-popup.php (modified) (1 diff)
-
tags/2.1.3/variation-swatches-for-woocommerce.php (modified) (3 diffs)
-
trunk/assets/css/admin.css (modified) (2 diffs)
-
trunk/assets/css/admin.css.map (modified) (1 diff)
-
trunk/assets/css/admin.scss (modified) (2 diffs)
-
trunk/assets/js/frontend.js (modified) (5 diffs)
-
trunk/includes/class-frontend.php (modified) (14 diffs)
-
trunk/includes/class-setting-fields-manager.php (modified) (35 diffs)
-
trunk/includes/class-setting-fields-renderer.php (modified) (3 diffs)
-
trunk/includes/class-variation-swatches.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/templates/admin/welcome-popup.php (modified) (1 diff)
-
trunk/variation-swatches-for-woocommerce.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
variation-swatches-for-woocommerce/tags/2.1.3/assets/css/admin.css
r2634227 r2653659 355 355 } 356 356 357 span.sw-input-type-icon { 358 display: block; 359 background: #F0F0F1; 360 height: 28px; 361 padding: 0 7px; 362 position: absolute; 363 line-height: 28px; 364 left: 2px; 365 top: 1px; 366 border-top-left-radius: 5px; 367 border-bottom-left-radius: 5px; 368 } 369 357 370 input.font-size-input { 358 371 width: 70px; … … 535 548 display: flex; 536 549 } 537 .variation-switch-field .field-with-html-after { 550 .variation-switch-field .field-with-html-after, 551 .variation-switch-field .field-with-html-before { 538 552 position: relative; 553 } 554 .variation-switch-field .field-with-html-before input[type=number] { 555 padding-left: 27px; 556 width: 65px; 557 -moz-appearance: textfield; 558 } 559 .variation-switch-field .field-with-html-before input[type=number]::-webkit-outer-spin-button, .variation-switch-field .field-with-html-before input[type=number]::-webkit-inner-spin-button { 560 -webkit-appearance: none; 561 margin: 0; 539 562 } 540 563 .variation-switch-field .wp-picker-container .wp-color-result.button { -
variation-swatches-for-woocommerce/tags/2.1.3/assets/css/admin.css.map
r2634227 r2653659 1 {"version":3,"sourceRoot":"","sources":["admin.scss"],"names":[],"mappings":";AACE;EACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;;AAIJ;EACE;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;;AAEA;EACE;;AAIA;EACE;;AAGF;EACE;;;AAKN;AAEA;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;AAEA;EACE;EACA;EACA;;;AAIJ;EACE;EACA;EACA;AAEA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EASE;;AARA;EACE;EACA;EACA;EACA;EACA;;;AAQR;EACE;IACE;IACA;;;EAGF;IACE;IACA;IACA;;;EAGF;IACE;IACA;IACA;;;EAGF;IACE;;;AAIJ;EACE;IACE;;;AAIJ;EACE;IACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;AAAA;AAAA;AAIA;EACE;EACA;EACA;;;AAIA;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;;;AAKF;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAIJ;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAIA;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;;AAKN;EACE;IACE;IACA;IACA;IACA;;;AAIJ;EAEI;IACE;IACA;IACA;IACA;;EAGF;IACE;IACA;IACA;IACA;;EAEA;IACE;;;AAMR;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;;;AAIA;EACE;;AAGF;EACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA; ;;AAIA;EACE;;AAGF;EACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAEA;AAAA;EAEE;;AAGF;AAAA;EAEE;;AAGF;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAKN;EACE;EACA;;AAEA;EACE;;AAGF;EACE;;;AAKN;EACE;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;AAEA;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAKF;EACE;;AAGF;EACE;;AAGF;EACE;EACA;EACA;;AAIJ;EACE;;AAEA;EACE;;;AAKN;AAEA;AAEA;AAEA;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;;AAIJ;EACE;;AAEA;EACE;;;AAIJ;EACE;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;;;AAIJ;EACE;EACA;;;AAGF;EACE;EACA;EACA;;AAEA;EACE;;;AAIJ;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAEA;EACE;;AAKN;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAIJ;EACE;;;AAIJ;EACE;;AAEA;EACE;EACA;;AAGF;EACE;;;AAIJ;EACE;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAOE;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAKF;EACE;;AAKF;EACE;;;AAMR;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;AAIA;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;;AAMN;EACE;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;IACE;;;AAKF;EACE;;AAGF;EACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAIA;EACE;;AAEA;EACE;EACA;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAIJ;EACE;IACE;;;AAIJ;EACE;IACE;IACA;;;EAGF;IACE;;;AAIJ;EACE;IACE;;EAEA;IACE;IACA;;;EAIJ;IACE;;;EAGF;IACE;;;EAGF;IACE;;;AAIJ;EACE;;;AAIA;EACE;EACA;;AAGF;EACE;;;AAIJ;EACE;IACE;IACA;;;AAIJ;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;AAGE;EACE;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAEA;EACE;;AAIJ;EACE;EACA;;AAGF;EACE;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;;AAEA;EACE;;AAKF;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAGF;EACE;EACA;EACA;;AAIJ;EACE;EACA;EACA;;AAIA;EACE;EACA;EACA;;;AAKN;EAEI;IACE;IACA;IACA;IACA;;EAGF;IACE;IACA;IACA;IACA;;;AAMJ;EACE;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAIJ;EACE;;;AAIJ;EACE;;;AAGF;EACE;EACA;;AAEA;EACE;EACA;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGE;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAIA;EACE;;;AAQV;EACE;EACA;;AAGE;EACE;;AAEA;EACE;;AAIJ;EACE;;AAGF;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAMF;EACE;;AAMN;EAzCF;IA0CI;;;AAGF;EA7CF;IA8CI;IACA;;;AAGF;EAlDF;IAmDI;IACA;;;;AAQE;EACE;;AAIJ;EACE;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;EACA;EACA;;AAIA;EACE;EACA;;AAGF;EACE;;AAON;EAnDF;IAoDI;IACA;IACA;;;AAEF;EAxDF;IAyDI;IACA;;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAKE;EACE;EACA;EACA;;;AAKN;EACE;;;AAGF;AAAA;AAAA;EAGE;;;AAGF;AAAA;EAEE;;AAGE;AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAKN;EACE;IACE;;EAEF;IACE;;;AAIJ;EACE;IACE;;EAEF;IACE;;;AAIJ;EAEE;IACE;IACA;IACA;;;AAIJ;EACE;IACE;;;EAGF;IACE;IACA;;;EAIA;IACE;IACA;;EAGF;IACE;;;AAKN;AAEA;EACE;IACE;;EAEF;IACE;;;AAIJ;EACE;IACE;;EAEF;IACE","file":"admin.css"}1 {"version":3,"sourceRoot":"","sources":["admin.scss"],"names":[],"mappings":";AACE;EACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;;AAIJ;EACE;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;;AAEA;EACE;;AAIA;EACE;;AAGF;EACE;;;AAKN;AAEA;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;AAEA;EACE;EACA;EACA;;;AAIJ;EACE;EACA;EACA;AAEA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EASE;;AARA;EACE;EACA;EACA;EACA;EACA;;;AAQR;EACE;IACE;IACA;;;EAGF;IACE;IACA;IACA;;;EAGF;IACE;IACA;IACA;;;EAGF;IACE;;;AAIJ;EACE;IACE;;;AAIJ;EACE;IACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;AAAA;AAAA;AAIA;EACE;EACA;EACA;;;AAIA;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;;;AAKF;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAIJ;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAIA;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;;AAKN;EACE;IACE;IACA;IACA;IACA;;;AAIJ;EAEI;IACE;IACA;IACA;IACA;;EAGF;IACE;IACA;IACA;IACA;;EAEA;IACE;;;AAMR;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;;;AAIA;EACE;;AAGF;EACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAIA;EACE;;AAGF;EACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAEA;AAAA;EAEE;;AAGF;AAAA;EAEE;;AAGF;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAKN;EACE;EACA;;AAEA;EACE;;AAGF;EACE;;;AAKN;EACE;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;AAEA;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAKF;EACE;;AAGF;EACE;;AAGF;EACE;EACA;EACA;;AAIJ;EACE;;AAEA;EACE;;;AAKN;AAEA;AAEA;AAEA;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;;AAIJ;EACE;;AAEA;EACE;;;AAIJ;EACE;;AAEA;AAAA;EAEE;;AAIA;EACE;EACA;EACA;;AAEA;EAEE;EACA;;AAKN;EACE;;AAGF;EACE;;;AAIJ;EACE;EACA;;;AAGF;EACE;EACA;EACA;;AAEA;EACE;;;AAIJ;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAEA;EACE;;AAKN;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAIJ;EACE;;;AAIJ;EACE;;AAEA;EACE;EACA;;AAGF;EACE;;;AAIJ;EACE;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAOE;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAKF;EACE;;AAKF;EACE;;;AAMR;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;AAIA;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;;AAMN;EACE;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;IACE;;;AAKF;EACE;;AAGF;EACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAIA;EACE;;AAEA;EACE;EACA;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAIJ;EACE;IACE;;;AAIJ;EACE;IACE;IACA;;;EAGF;IACE;;;AAIJ;EACE;IACE;;EAEA;IACE;IACA;;;EAIJ;IACE;;;EAGF;IACE;;;EAGF;IACE;;;AAIJ;EACE;;;AAIA;EACE;EACA;;AAGF;EACE;;;AAIJ;EACE;IACE;IACA;;;AAIJ;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;AAGE;EACE;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAEA;EACE;;AAIJ;EACE;EACA;;AAGF;EACE;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;;AAEA;EACE;;AAKF;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAGF;EACE;EACA;EACA;;AAIJ;EACE;EACA;EACA;;AAIA;EACE;EACA;EACA;;;AAKN;EAEI;IACE;IACA;IACA;IACA;;EAGF;IACE;IACA;IACA;IACA;;;AAMJ;EACE;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAIJ;EACE;;;AAIJ;EACE;;;AAGF;EACE;EACA;;AAEA;EACE;EACA;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGE;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAIA;EACE;;;AAQV;EACE;EACA;;AAGE;EACE;;AAEA;EACE;;AAIJ;EACE;;AAGF;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAMF;EACE;;AAMN;EAzCF;IA0CI;;;AAGF;EA7CF;IA8CI;IACA;;;AAGF;EAlDF;IAmDI;IACA;;;;AAQE;EACE;;AAIJ;EACE;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;EACA;EACA;;AAIA;EACE;EACA;;AAGF;EACE;;AAON;EAnDF;IAoDI;IACA;IACA;;;AAEF;EAxDF;IAyDI;IACA;;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAKE;EACE;EACA;EACA;;;AAKN;EACE;;;AAGF;AAAA;AAAA;EAGE;;;AAGF;AAAA;EAEE;;AAGE;AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAKN;EACE;IACE;;EAEF;IACE;;;AAIJ;EACE;IACE;;EAEF;IACE;;;AAIJ;EAEE;IACE;IACA;IACA;;;AAIJ;EACE;IACE;;;EAGF;IACE;IACA;;;EAIA;IACE;IACA;;EAGF;IACE;;;AAKN;AAEA;EACE;IACE;;EAEF;IACE;;;AAIJ;EACE;IACE;;EAEF;IACE","file":"admin.css"} -
variation-swatches-for-woocommerce/tags/2.1.3/assets/css/admin.scss
r2634227 r2653659 396 396 border-top-right-radius: 5px; 397 397 border-bottom-right-radius: 5px; 398 } 399 400 span.sw-input-type-icon { 401 display: block; 402 background: #F0F0F1; 403 height: 28px; 404 padding: 0 7px; 405 position: absolute; 406 line-height: 28px; 407 left: 2px; 408 top: 1px; 409 border-top-left-radius: 5px; 410 border-bottom-left-radius: 5px; 398 411 } 399 412 … … 608 621 display: flex; 609 622 610 .field-with-html-after { 623 .field-with-html-after, 624 .field-with-html-before { 611 625 position: relative; 626 } 627 628 .field-with-html-before { 629 input[type="number"] { 630 padding-left: 27px; 631 width: 65px; 632 -moz-appearance: textfield; 633 634 &::-webkit-outer-spin-button, 635 &::-webkit-inner-spin-button { 636 -webkit-appearance: none; 637 margin: 0; 638 } 639 } 612 640 } 613 641 -
variation-swatches-for-woocommerce/tags/2.1.3/assets/js/frontend.js
r2634227 r2653659 9 9 var $form = $(this); 10 10 11 if (typeof $form.find(".tawcvs-available-product-variation").data("product_variations") !== "undefined") { 12 $form.data("product_variations", $form.find(".tawcvs-available-product-variation").data("product_variations")) 13 .trigger('reload_product_variations') 14 .trigger('update_variation_values'); 15 } 16 11 17 $form 12 18 .addClass('swatches-support') 13 .data("product_variations", $form.find(".tawcvs-available-product-variation").data("product_variations"))14 .trigger('reload_product_variations')15 19 .on("found_variation", function (event, variation) { 16 20 change_variation_image_on_shop_page($form, variation); … … 78 82 value = $swatch.attr('data-value'); 79 83 84 $swatch.closest('.swatch-item-wrapper').show(); 85 80 86 if (values.indexOf(value) > -1) { 81 87 $swatch.removeClass('disabled'); 82 88 } else { 83 89 $swatch.addClass('disabled'); 84 90 85 91 if ($swatch.closest('.tawcvs-swatches').hasClass('oss-hide')) { 86 92 $swatch.closest('.swatch-item-wrapper').hide(); 87 93 } 88 94 89 95 if ($selected.length && value === $selected.val()) { 90 96 $swatch.removeClass('selected'); … … 104 110 function toggle_hidden_variation_btn() { 105 111 const resetVariationNodes = document.getElementsByClassName('reset_variations'); 106 107 112 if (resetVariationNodes.length) { 108 109 113 Array.prototype.forEach.call(resetVariationNodes, function (resetVariationEle) { 110 111 114 let observer = new MutationObserver(function () { 112 113 115 if (resetVariationEle.style.visibility !== 'hidden') { 114 115 116 resetVariationEle.style.display = 'block'; 116 117 117 } else { 118 119 118 resetVariationEle.style.display = 'none'; 120 121 119 } 122 123 120 }); 124 125 121 observer.observe(resetVariationEle, {attributes: true, childList: true}); 126 127 122 }) 128 129 123 } 130 124 } … … 133 127 var $product = $form.closest('.product'), 134 128 $product_img = $product.find('.woocommerce-LoopProduct-link img'); 135 129 136 130 if ($product_img.length !== 1) { 137 131 return false; … … 168 162 169 163 $(function () { 170 $('.variations_form').tawcvs_variation_swatches_form() ;164 $('.variations_form').tawcvs_variation_swatches_form().trigger('woocommerce_update_variation_values'); 171 165 $(document.body).trigger('tawcvs_initialized'); 172 166 toggle_hidden_variation_btn(); 173 167 }); 174 168 175 $(document).ajaxComplete(function () { 169 $(document).ajaxComplete(function () { 176 170 var $variations_form = $('.variations_form:not(.swatches-support)'); 177 171 if ($variations_form.length > 0) { 178 $variations_form.each(function () {179 $(this).wc_variation_form();180 });172 $variations_form.each(function () { 173 $(this).wc_variation_form(); 174 }); 181 175 $variations_form.tawcvs_variation_swatches_form(); 182 176 } -
variation-swatches-for-woocommerce/tags/2.1.3/includes/class-frontend.php
r2634227 r2653659 44 44 $this->generalSettings = isset( $latest_option['general'] ) ? $latest_option['general'] : array(); 45 45 $this->archiveSettings = isset( $latest_option['archive'] ) ? $latest_option['archive'] : array(); 46 $this->productDesign = isset( $latest_option['design']['productDesign'] ) ? $latest_option['design']['productDesign'] : array();47 $this->shopDesign = isset( $latest_option['design']['shopDesign'] ) ? $latest_option['design']['shopDesign'] : array();48 $this->toolTipDesign = isset( $latest_option['design']['toolTipDesign'] ) ? $latest_option['design']['toolTipDesign'] : array();46 $this->productDesign = isset( $latest_option['design']['productDesign'] ) ? $latest_option['design']['productDesign'] : array(); 47 $this->shopDesign = isset( $latest_option['design']['shopDesign'] ) ? $latest_option['design']['shopDesign'] : array(); 48 $this->toolTipDesign = isset( $latest_option['design']['toolTipDesign'] ) ? $latest_option['design']['toolTipDesign'] : array(); 49 49 50 50 … … 73 73 return ''; 74 74 } 75 $supported_swatch_types = TA_WCVS()->types;75 $supported_swatch_types = TA_WCVS()->types; 76 76 $dropdown_to_label_setting = isset( $this->generalSettings['dropdown-to-label'] ) && $this->generalSettings['dropdown-to-label']; 77 77 … … 103 103 public function get_available_variation() { 104 104 global $product; 105 106 if ( 'yes' === get_option( 'woocommerce_hide_out_of_stock_items' ) || $this->is_disabled_checking_availability()) { 107 return ''; 108 } 109 105 110 if ( $product instanceof WC_Product_Variable ) { 106 $variations_json = wp_json_encode( $product->get_available_variations() );111 $variations_json = wp_json_encode( TA_WC_Variation_Swatches::get_available_variations( $product, true, true ) ); 107 112 $variations_attr = function_exists( 'wc_esc_json' ) ? wc_esc_json( $variations_json ) : _wp_specialchars( $variations_json, ENT_QUOTES, 'UTF-8', true ); 108 113 if ( ! empty( $variations_attr ) ) { … … 145 150 } 146 151 147 $options = $args['options'];148 $product = $args['product'];152 $options = $args['options']; 153 $product = $args['product']; 149 154 $attribute_tax_name = $args['attribute']; 150 $class = "variation-selector variation-select-{$attr->attribute_type}";151 $swatches = '';152 $is_product_page = is_product();153 $defined_limit = apply_filters( 'tawcvs_swatch_limit_number', 0 );155 $class = "variation-selector variation-select-{$attr->attribute_type}"; 156 $swatches = ''; 157 $is_product_page = is_product(); 158 $defined_limit = apply_filters( 'tawcvs_swatch_limit_number', 0 ); 154 159 $out_of_stock_state = apply_filters( 'tawcvs_out_of_stock_state', '' ); 155 160 … … 161 166 if ( empty( $options ) && ! empty( $product ) && ! empty( $attribute_tax_name ) ) { 162 167 $attributes = $product->get_variation_attributes(); 163 $options = $attributes[ $attribute_tax_name ];168 $options = $attributes[ $attribute_tax_name ]; 164 169 } 165 170 … … 171 176 // Add new option for tooltip to $args variable. 172 177 $args['tooltip'] = apply_filters( 'tawcvs_tooltip_enabled', $this->is_tooltip_enabled() ); 178 173 179 //Get the product variation detail for each attribute 174 180 //If there are more than one attributes, the first one will be applied 175 $collected_variations = TA_WC_Variation_Swatches::get_detailed_product_variations( $product, $attribute_tax_name ); 181 $collected_variations = array(); 182 183 if ( TA_WC_Variation_Swatches::is_pro_addon_active() && ! $this->is_use_attribute_image_only() ) { 184 $collected_variations = TA_WC_Variation_Swatches::get_detailed_product_variations( $product, $attribute_tax_name ); 185 } 176 186 177 187 if ( ! empty( $options ) && taxonomy_exists( $attribute_tax_name ) ) { … … 201 211 202 212 if ( ! empty( $swatches ) ) { 203 $class .= ' hidden';213 $class .= ' hidden'; 204 214 $swatches = '<div class="tawcvs-swatches oss-' . $out_of_stock_state . '" data-attribute_name="attribute_' . esc_attr( $attribute_tax_name ) . '">' . $swatches . '</div>'; 205 $html = '<div class="' . esc_attr( $class ) . '">' . $html . '</div>' . $swatches;215 $html = '<div class="' . esc_attr( $class ) . '">' . $html . '</div>' . $swatches; 206 216 } 207 217 208 218 return $html; 219 } 220 221 private function is_use_attribute_image_only() { 222 return wc_string_to_bool( isset( $this->generalSettings['attribute-image-only'] ) ? $this->generalSettings['attribute-image-only'] : 0 ); 223 } 224 225 private function is_disabled_checking_availability() { 226 return wc_string_to_bool( isset( $this->generalSettings['disable-checking-availability'] ) ? $this->generalSettings['disable-checking-availability'] : 0 ); 209 227 } 210 228 … … 252 270 253 271 $selected = sanitize_title( $args['selected'] ) == $term->slug ? 'selected' : ''; 254 $name = esc_html( apply_filters( 'woocommerce_variation_option_name', $term->name ) );272 $name = esc_html( apply_filters( 'woocommerce_variation_option_name', $term->name ) ); 255 273 256 274 $tooltip = $this->get_tooltip_html( '', $term, $name, $args ); … … 259 277 $swatchShape = isset( $this->generalSettings['swatch-shape'] ) ? $this->generalSettings['swatch-shape'] : 'circle'; 260 278 261 262 279 switch ( $type ) { 263 280 case 'color': 264 $main_color = get_term_meta( $term->term_id, 'color', true );281 $main_color = get_term_meta( $term->term_id, 'color', true ); 265 282 $formatted_color_style = TA_WC_Variation_Swatches::generate_color_style( $term->term_id, $main_color ); 266 283 list( $r, $g, $b ) = sscanf( $main_color, "#%02x%02x%02x" ); 284 285 if ( $this->is_show_label_enabled() ) { 286 $class = ' swatch-label '; 287 $text_shadow = 'text-shadow: -1px -1px 0 #555, 1px -1px 0 #555, -1px 1px 0 #555, 1px 1px 0 #555;'; 288 $color = 'white'; 289 } else { 290 $class = ' swatch-color '; 291 $text_shadow = ''; 292 $color = 'rgba($r,$g,$b,0.5)'; 293 } 294 267 295 $html = sprintf( 268 '<div class="swatch-item-wrapper"><div class="swatch swatch-shape-' . $swatchShape . ' swatch-color swatch-%s %s" style="background:%s;color:%s;" data-value="%s"></div>%s</div>',296 '<div class="swatch-item-wrapper"><div class="swatch swatch-shape-' . $swatchShape . $class . ' swatch-%s %s" style="background:%s;color:%s;' . $text_shadow . '" data-value="%s"><span class="text">%s</span></div>%s</div>', 269 297 esc_attr( $term->slug ), 270 298 $selected, 271 299 esc_attr( $formatted_color_style ), 272 "rgba($r,$g,$b,0.5)", 273 esc_attr( $term->slug ), 300 $color, 301 esc_attr( $term->slug ), 302 $name, 274 303 $tooltip 275 304 ); 276 305 break; 277 278 306 case 'image': 279 307 // First, we check the default thumbnail of attribute variation 280 308 $attach_id = get_term_meta( $term->term_id, 'image', true ); 281 309 if ( ! empty( $attach_id ) ) { 282 $image_url = wp_get_attachment_image_url( $attach_id );310 $image_url = wp_get_attachment_image_url( $attach_id, 'large' ); 283 311 } else { 284 312 //If we also do not have default thumbnail, we will use the placeholder image of WC … … 288 316 289 317 $html = sprintf( 290 '<div class="swatch-item-wrapper"><div class="swatch swatch-shape-' . $swatchShape . ' swatch-image swatch-%s %s %s" data-value="%s" ><img src="%s" alt="%s"></div>%s</div>',318 '<div class="swatch-item-wrapper"><div class="swatch swatch-shape-' . $swatchShape . ' swatch-image swatch-%s %s %s" data-value="%s" style="background-image:url(%s);background-size:cover;%s"></div>%s</div>', 291 319 esc_attr( $term->slug ), 292 320 $selected, … … 294 322 esc_attr( $term->slug ), 295 323 esc_url( $image_url ), 296 esc_attr( $name ),324 ( isset( $this->generalSettings['image-position'] ) ? 'background-position:' . $this->generalSettings['image-position'] . ';' : '' ), // background position 297 325 $tooltip 298 326 ); … … 301 329 $label = get_term_meta( $term->term_id, 'label', true ); 302 330 $label = $label ?: $name; 303 $html = sprintf(331 $html = sprintf( 304 332 '<div class="swatch-item-wrapper"><div class="swatch swatch-shape-' . $swatchShape . ' swatch-label swatch-%s %s" data-value="%s"><span class="text">%s</span></div>%s</div>', 305 333 esc_attr( $term->slug ), … … 346 374 do_action( 'woocommerce_variable_add_to_cart' ); 347 375 echo '</div>'; 376 377 // fix variation doesn't appear on list page 378 add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart' ); 348 379 } else { 349 380 return $html; … … 363 394 364 395 return wc_string_to_bool( isset( $this->generalSettings['enable-tooltip'] ) ? $this->generalSettings['enable-tooltip'] : 0 ); 396 } 397 /** 398 * 399 * Return the boolean to check if show label on color swatches is enabled in General Settings page 400 * 401 * @return bool 402 */ 403 public function is_show_label_enabled() { 404 if ( isset( $this->generalSettings['show-label-on-color-swatches'] ) && $this->generalSettings['show-label-on-color-swatches'] == 1 && TA_WC_Variation_Swatches::is_pro_addon_active() ) { 405 return true; 406 } else { 407 return false; 408 } 365 409 } 366 410 -
variation-swatches-for-woocommerce/tags/2.1.3/includes/class-setting-fields-manager.php
r2618453 r2653659 102 102 ), 103 103 array( 104 'title' => __( 'Show label inside swatches', 'wcvs' ), 105 'fields' => array( 106 array( 107 'id' => 'wcvs-show-label-on-color-swatches', 108 'type' => 'checkbox', 109 'name' => 'show-label-on-color-swatches', 110 ) 111 ), 112 'class' => 'indent', 113 'field_to_check' => 'wcvs-enable-color-swatches', 114 'desc' => __( 'Show the label for color swatches', 'wcvs' ), 115 'show_if_checked' => true, 116 'priority' => 1.2, 117 'is_pro_feature' => true, 118 ), 119 array( 104 120 'title' => __( 'Enable Image Swatches', 'wcvs' ), 105 121 'fields' => array( … … 174 190 ), 175 191 array( 192 'title' => __( 'Disable checking the variation product availability', 'wcvs' ), 193 'fields' => array( 194 array( 195 'id' => 'wcvs-disable-checking-availability', 196 'type' => 'checkbox', 197 'name' => 'disable-checking-availability', 198 ) 199 ), 200 'desc' => __( 'All variations will be shown as available to select.', 'wcvs' ), 201 'priority' => 4.1 202 ), 203 array( 176 204 'title' => __( 'Choose your swatch shape', 'wcvs' ), 177 205 'fields' => array( … … 259 287 ), 260 288 array( 289 'title' => __( 'Image position', 'woosuite-variation-swatches-pro' ), 290 'fields' => array( 291 array( 292 'id' => 'wcvs-image-position-pro', 293 'type' => 'select', 294 'options_group' => array( 295 array( 296 'value' => 'default', 297 'label' => __( 'Default', 'woosuite-variation-swatches-pro' ), 298 ) 299 ), 300 'class' => 'br-type', 301 'name' => 'image-position', 302 ) 303 ), 304 'desc' => __( 'Select option', 'woosuite-variation-swatches-pro' ), 305 'priority' => 5.2, 306 'is_pro_feature' => true, 307 ), 308 array( 261 309 'title' => __( 'Disable Default Plugin Stylesheet', 'wcvs' ), 262 310 'fields' => array( … … 417 465 'type' => 'number', 418 466 'name' => 'mar-top', 419 'default_value' => '0' 467 'default_value' => '0', 468 'html_before' => '<span class="sw-input-type-icon">↑</span>' 420 469 ), 421 470 array( … … 423 472 'type' => 'number', 424 473 'name' => 'mar-right', 425 'default_value' => '15' 474 'default_value' => '15', 475 'html_before' => '<span class="sw-input-type-icon">→</span>' 426 476 ), 427 477 array( … … 429 479 'type' => 'number', 430 480 'name' => 'mar-bottom', 431 'default_value' => '15' 481 'default_value' => '15', 482 'html_before' => '<span class="sw-input-type-icon">↓</span>' 432 483 ), 433 484 array( … … 435 486 'type' => 'number', 436 487 'name' => 'mar-left', 437 'default_value' => '0' 488 'default_value' => '0', 489 'html_before' => '<span class="sw-input-type-icon">←</span>' 438 490 ), 439 491 array( … … 471 523 'type' => 'number', 472 524 'name' => 'pad-top', 473 'default_value' => '0' 525 'default_value' => '0', 526 'html_before' => '<span class="sw-input-type-icon">↑</span>' 474 527 ), 475 528 array( … … 477 530 'type' => 'number', 478 531 'name' => 'pad-right', 479 'default_value' => '0' 532 'default_value' => '0', 533 'html_before' => '<span class="sw-input-type-icon">→</span>' 480 534 ), 481 535 array( … … 483 537 'type' => 'number', 484 538 'name' => 'pad-bottom', 485 'default_value' => '0' 539 'default_value' => '0', 540 'html_before' => '<span class="sw-input-type-icon">↓</span>' 486 541 ), 487 542 array( … … 489 544 'type' => 'number', 490 545 'name' => 'pad-left', 491 'default_value' => '0' 546 'default_value' => '0', 547 'html_before' => '<span class="sw-input-type-icon">←</span>' 492 548 ), 493 549 array( … … 525 581 'type' => 'number', 526 582 'name' => 'wrm-top', 527 'default_value' => '0' 583 'default_value' => '0', 584 'html_before' => '<span class="sw-input-type-icon">↑</span>' 528 585 ), 529 586 array( … … 531 588 'type' => 'number', 532 589 'name' => 'wrm-right', 533 'default_value' => '15' 590 'default_value' => '15', 591 'html_before' => '<span class="sw-input-type-icon">→</span>' 534 592 ), 535 593 array( … … 537 595 'type' => 'number', 538 596 'name' => 'wrm-bottom', 539 'default_value' => '15' 597 'default_value' => '15', 598 'html_before' => '<span class="sw-input-type-icon">↓</span>' 540 599 ), 541 600 array( … … 543 602 'type' => 'number', 544 603 'name' => 'wrm-left', 545 'default_value' => '0' 604 'default_value' => '0', 605 'html_before' => '<span class="sw-input-type-icon">←</span>' 546 606 ), 547 607 array( … … 579 639 'type' => 'number', 580 640 'name' => 'wrp-top', 581 'default_value' => '0' 641 'default_value' => '0', 642 'html_before' => '<span class="sw-input-type-icon">↑</span>' 582 643 ), 583 644 array( … … 585 646 'type' => 'number', 586 647 'name' => 'wrp-right', 587 'default_value' => '0' 648 'default_value' => '0', 649 'html_before' => '<span class="sw-input-type-icon">→</span>' 588 650 ), 589 651 array( … … 591 653 'type' => 'number', 592 654 'name' => 'wrp-bottom', 593 'default_value' => '0' 655 'default_value' => '0', 656 'html_before' => '<span class="sw-input-type-icon">↓</span>' 594 657 ), 595 658 array( … … 597 660 'type' => 'number', 598 661 'name' => 'wrp-left', 599 'default_value' => '0' 662 'default_value' => '0', 663 'html_before' => '<span class="sw-input-type-icon">←</span>' 600 664 ), 601 665 array( … … 757 821 'type' => 'number', 758 822 'name' => 'mar-top', 759 'default_value' => '0' 823 'default_value' => '0', 824 'html_before' => '<span class="sw-input-type-icon">↑</span>' 760 825 ), 761 826 array( … … 763 828 'type' => 'number', 764 829 'name' => 'mar-right', 765 'default_value' => '15' 830 'default_value' => '15', 831 'html_before' => '<span class="sw-input-type-icon">→</span>' 766 832 ), 767 833 array( … … 769 835 'type' => 'number', 770 836 'name' => 'mar-bottom', 771 'default_value' => '15' 837 'default_value' => '15', 838 'html_before' => '<span class="sw-input-type-icon">↓</span>' 772 839 ), 773 840 array( … … 775 842 'type' => 'number', 776 843 'name' => 'mar-left', 777 'default_value' => '0' 844 'default_value' => '0', 845 'html_before' => '<span class="sw-input-type-icon">←</span>' 778 846 ), 779 847 array( … … 811 879 'type' => 'number', 812 880 'name' => 'pad-top', 813 'default_value' => '0' 881 'default_value' => '0', 882 'html_before' => '<span class="sw-input-type-icon">↑</span>' 814 883 ), 815 884 array( … … 817 886 'type' => 'number', 818 887 'name' => 'pad-right', 819 'default_value' => '0' 888 'default_value' => '0', 889 'html_before' => '<span class="sw-input-type-icon">→</span>' 820 890 ), 821 891 array( … … 823 893 'type' => 'number', 824 894 'name' => 'pad-bottom', 825 'default_value' => '0' 895 'default_value' => '0', 896 'html_before' => '<span class="sw-input-type-icon">↓</span>' 826 897 ), 827 898 array( … … 829 900 'type' => 'number', 830 901 'name' => 'pad-left', 831 'default_value' => '0' 902 'default_value' => '0', 903 'html_before' => '<span class="sw-input-type-icon">←</span>' 832 904 ), 833 905 array( … … 865 937 'type' => 'number', 866 938 'name' => 'wrm-top', 867 'default_value' => '0' 939 'default_value' => '0', 940 'html_before' => '<span class="sw-input-type-icon">↑</span>' 868 941 ), 869 942 array( … … 871 944 'type' => 'number', 872 945 'name' => 'wrm-right', 873 'default_value' => '15' 946 'default_value' => '15', 947 'html_before' => '<span class="sw-input-type-icon">→</span>' 874 948 ), 875 949 array( … … 877 951 'type' => 'number', 878 952 'name' => 'wrm-bottom', 879 'default_value' => '15' 953 'default_value' => '15', 954 'html_before' => '<span class="sw-input-type-icon">↓</span>' 880 955 ), 881 956 array( … … 883 958 'type' => 'number', 884 959 'name' => 'wrm-left', 885 'default_value' => '0' 960 'default_value' => '0', 961 'html_before' => '<span class="sw-input-type-icon">←</span>' 886 962 ), 887 963 array( … … 919 995 'type' => 'number', 920 996 'name' => 'wrp-top', 921 'default_value' => '0' 997 'default_value' => '0', 998 'html_before' => '<span class="sw-input-type-icon">↑</span>' 922 999 ), 923 1000 array( … … 925 1002 'type' => 'number', 926 1003 'name' => 'wrp-right', 927 'default_value' => '0' 1004 'default_value' => '0', 1005 'html_before' => '<span class="sw-input-type-icon">→</span>' 928 1006 ), 929 1007 array( … … 931 1009 'type' => 'number', 932 1010 'name' => 'wrp-bottom', 933 'default_value' => '0' 1011 'default_value' => '0', 1012 'html_before' => '<span class="sw-input-type-icon">↓</span>' 934 1013 ), 935 1014 array( … … 937 1016 'type' => 'number', 938 1017 'name' => 'wrp-left', 939 'default_value' => '0' 1018 'default_value' => '0', 1019 'html_before' => '<span class="sw-input-type-icon">←</span>' 940 1020 ), 941 1021 array( -
variation-swatches-for-woocommerce/tags/2.1.3/includes/class-setting-fields-renderer.php
r2614321 r2653659 142 142 'field_to_check' => '', 143 143 'placeholder' => '', 144 'html_before' => '', 144 145 'html_after' => '', 145 146 'html' => '', … … 343 344 ob_start(); 344 345 echo empty( $args['html_after'] ) ? '' : '<div class="field-with-html-after">'; 345 ?> 346 echo empty( $args['html_before'] ) ? '' : '<div class="field-with-html-before">'; 347 348 echo empty( $args['html_before'] ) ? '' : $args['html_before']; 349 ?> 346 350 <input type="number" 347 351 name="<?php echo $field_name; ?>" … … 354 358 value="<?php echo $field_value; ?>"> 355 359 <?php 360 echo empty( $args['html_before'] ) ? '' : '</div>'; 356 361 echo empty( $args['html_after'] ) ? '' : $args['html_after'] . '</div>'; 357 362 -
variation-swatches-for-woocommerce/tags/2.1.3/includes/class-variation-swatches.php
r2634227 r2653659 189 189 $field_value = isset( $current_options[ $section_id ][ $field_name . '-' . $att->attribute_name ] ) ? $current_options[ $section_id ][ $field_name . '-' . $att->attribute_name ] : ''; 190 190 } 191 $field_id = $field_name . '-' . $att->attribute_name;191 $field_id = $field_name . '-' . $att->attribute_name; 192 192 $field_name_modified = $field_name_prefix . '[' . $field_name . '-' . $att->attribute_name . ']'; 193 193 … … 224 224 } 225 225 $collected_variations = array(); 226 $variations = self::get_available_variations( $product );226 $variations = self::get_available_variations( $product ); 227 227 228 228 if ( ! empty( $variations ) ) { … … 246 246 * @return array[]|WC_Product_Variation[] 247 247 */ 248 public static function get_available_variations( $product ) {248 public static function get_available_variations( $product, $ignore_out_of_stock = false, $get_full_attribute_data = false ) { 249 249 if ( ! $product instanceof WC_Product_Variable ) { 250 250 return array(); … … 265 265 266 266 // Hide out of stock variations if 'Hide out of stock items from the catalog' is checked. 267 if ( ! $variation || ! $variation->exists() ) {267 if ( ! $variation || ! $variation->exists() || ( $ignore_out_of_stock && ! $variation->is_in_stock() ) ) { 268 268 continue; 269 269 } … … 274 274 continue; 275 275 } 276 277 $available_variations[] = array( 278 'attributes' => $variation->get_variation_attributes(), 279 'variation_id' => $variation_id 280 ); 276 if ( $get_full_attribute_data ) { 277 $available_variations[] = $product->get_available_variation( $variation_id ); 278 } else { 279 $available_variations[] = array( 280 'attributes' => $variation->get_variation_attributes(), 281 'variation_id' => $variation_id, 282 ); 283 } 281 284 } 282 285 -
variation-swatches-for-woocommerce/tags/2.1.3/readme.txt
r2634227 r2653659 4 4 Requires at least: 4.5 5 5 Tested up to: 5.8.2 6 Stable tag: 2.1. 26 Stable tag: 2.1.3 7 7 WC requires at least: 3.2.0 8 WC tested up to: 5.9.08 WC tested up to: 6.0.0 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 54 54 55 55 56 Visit <a href="https://woosuite.com/blog/" rel="friend" title="WPBeginner">the Woosuite blog</a> to learn from our <a href="https://woosuite.com/woocommerce/" rel="friend" title="WooCommerce Tutorials">WordPress Tutorials</a> and find out about other <a href="https://woosuite.com/plugins/" rel="friend" title="Best WordPress Plugins">WooCommerce plugins</a>.56 Visit <a href="https://woosuite.com/blog/" rel="friend">the Woosuite blog</a> to learn from our <a href="https://woosuite.com/woocommerce/" rel="friend" title="WooCommerce Tutorials">WordPress Tutorials</a> and find out about other <a href="https://woosuite.com/plugins/" rel="friend" title="Best WordPress Plugins">WooCommerce plugins</a>. 57 57 58 58 … … 104 104 105 105 == Changelog == 106 = 2.1.3 = 107 * Fixed firefox showing unavailable sizes 108 * Create option for image position for swatches 109 * Added arrows for the margin and padding setting fields 110 * Fix swatches not resetting appearance on click event 111 * Add option to use variable image only 112 * Add an option to disable checking variation availability 113 106 114 = 2.1.2 = 107 115 * Remove inline styles when disable plugin styling is active -
variation-swatches-for-woocommerce/tags/2.1.3/templates/admin/welcome-popup.php
r2634227 r2653659 7 7 <div class="popup-content"> 8 8 <div class="popup-inner-content"> 9 <p><strong>Congratulations on updating to v2.1. 2!</strong></p>10 <p> We’ve been quiet on this end for several days as we’ve been hard at work making our plugin even better for you…</p>9 <p><strong>Congratulations on updating to v2.1.3!</strong></p> 10 <p>And Happy New Year🎉 We’ve been quiet on this end for several weeks as we’ve been hard at work making our plugin even better for you…</p> 11 11 <p>Based on your feedback, we have added a bunch of new features and enhancements with a lot more to go.</p> 12 <p><a href="https://woosuite.com/news/variation-swatches- v2-1-2-update/" target="_blank" rel="noopener noreferrer nofollow"> Click here to learn more. </a></p>12 <p><a href="https://woosuite.com/news/variation-swatches-updates/" target="_blank" rel="noopener noreferrer nofollow"> Click here to learn more. </a></p> 13 13 <p>If you experience any issues, please get in touch with support so we can make it right: <a href="https://woosuite.com/support/" target="_blank" rel="noopener noreferrer nofollow">Support</a></p> 14 14 </div> -
variation-swatches-for-woocommerce/tags/2.1.3/variation-swatches-for-woocommerce.php
r2634227 r2653659 4 4 * Plugin URI: https://woosuite.com/plugins/woocommerce-variation-swatches/ 5 5 * Description: Creates variation swatches for WooCommerce, converts your variation dropdown into color, label, or photo swatches with ease, The original Variation Swatches for WooCommerce. 6 * Version: 2.1. 26 * Version: 2.1.3 7 7 * Author: Woosuite 8 8 * Author URI: https://woosuite.com/ … … 12 12 * Domain Path: /languages 13 13 * WC requires at least: 3.0.0 14 * WC tested up to: 5.9.014 * WC tested up to: 6.0.0 15 15 * 16 16 * License: GPLv2 or later … … 28 28 29 29 if ( ! defined( 'WCVS_PLUGIN_VERSION' ) ) { 30 define( 'WCVS_PLUGIN_VERSION', '2.1. 2' );30 define( 'WCVS_PLUGIN_VERSION', '2.1.3' ); 31 31 } 32 32 -
variation-swatches-for-woocommerce/trunk/assets/css/admin.css
r2634227 r2653659 355 355 } 356 356 357 span.sw-input-type-icon { 358 display: block; 359 background: #F0F0F1; 360 height: 28px; 361 padding: 0 7px; 362 position: absolute; 363 line-height: 28px; 364 left: 2px; 365 top: 1px; 366 border-top-left-radius: 5px; 367 border-bottom-left-radius: 5px; 368 } 369 357 370 input.font-size-input { 358 371 width: 70px; … … 535 548 display: flex; 536 549 } 537 .variation-switch-field .field-with-html-after { 550 .variation-switch-field .field-with-html-after, 551 .variation-switch-field .field-with-html-before { 538 552 position: relative; 553 } 554 .variation-switch-field .field-with-html-before input[type=number] { 555 padding-left: 27px; 556 width: 65px; 557 -moz-appearance: textfield; 558 } 559 .variation-switch-field .field-with-html-before input[type=number]::-webkit-outer-spin-button, .variation-switch-field .field-with-html-before input[type=number]::-webkit-inner-spin-button { 560 -webkit-appearance: none; 561 margin: 0; 539 562 } 540 563 .variation-switch-field .wp-picker-container .wp-color-result.button { -
variation-swatches-for-woocommerce/trunk/assets/css/admin.css.map
r2634227 r2653659 1 {"version":3,"sourceRoot":"","sources":["admin.scss"],"names":[],"mappings":";AACE;EACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;;AAIJ;EACE;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;;AAEA;EACE;;AAIA;EACE;;AAGF;EACE;;;AAKN;AAEA;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;AAEA;EACE;EACA;EACA;;;AAIJ;EACE;EACA;EACA;AAEA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EASE;;AARA;EACE;EACA;EACA;EACA;EACA;;;AAQR;EACE;IACE;IACA;;;EAGF;IACE;IACA;IACA;;;EAGF;IACE;IACA;IACA;;;EAGF;IACE;;;AAIJ;EACE;IACE;;;AAIJ;EACE;IACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;AAAA;AAAA;AAIA;EACE;EACA;EACA;;;AAIA;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;;;AAKF;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAIJ;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAIA;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;;AAKN;EACE;IACE;IACA;IACA;IACA;;;AAIJ;EAEI;IACE;IACA;IACA;IACA;;EAGF;IACE;IACA;IACA;IACA;;EAEA;IACE;;;AAMR;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;;;AAIA;EACE;;AAGF;EACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA; ;;AAIA;EACE;;AAGF;EACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAEA;AAAA;EAEE;;AAGF;AAAA;EAEE;;AAGF;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAKN;EACE;EACA;;AAEA;EACE;;AAGF;EACE;;;AAKN;EACE;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;AAEA;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAKF;EACE;;AAGF;EACE;;AAGF;EACE;EACA;EACA;;AAIJ;EACE;;AAEA;EACE;;;AAKN;AAEA;AAEA;AAEA;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;;AAIJ;EACE;;AAEA;EACE;;;AAIJ;EACE;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;;;AAIJ;EACE;EACA;;;AAGF;EACE;EACA;EACA;;AAEA;EACE;;;AAIJ;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAEA;EACE;;AAKN;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAIJ;EACE;;;AAIJ;EACE;;AAEA;EACE;EACA;;AAGF;EACE;;;AAIJ;EACE;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAOE;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAKF;EACE;;AAKF;EACE;;;AAMR;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;AAIA;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;;AAMN;EACE;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;IACE;;;AAKF;EACE;;AAGF;EACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAIA;EACE;;AAEA;EACE;EACA;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAIJ;EACE;IACE;;;AAIJ;EACE;IACE;IACA;;;EAGF;IACE;;;AAIJ;EACE;IACE;;EAEA;IACE;IACA;;;EAIJ;IACE;;;EAGF;IACE;;;EAGF;IACE;;;AAIJ;EACE;;;AAIA;EACE;EACA;;AAGF;EACE;;;AAIJ;EACE;IACE;IACA;;;AAIJ;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;AAGE;EACE;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAEA;EACE;;AAIJ;EACE;EACA;;AAGF;EACE;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;;AAEA;EACE;;AAKF;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAGF;EACE;EACA;EACA;;AAIJ;EACE;EACA;EACA;;AAIA;EACE;EACA;EACA;;;AAKN;EAEI;IACE;IACA;IACA;IACA;;EAGF;IACE;IACA;IACA;IACA;;;AAMJ;EACE;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAIJ;EACE;;;AAIJ;EACE;;;AAGF;EACE;EACA;;AAEA;EACE;EACA;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGE;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAIA;EACE;;;AAQV;EACE;EACA;;AAGE;EACE;;AAEA;EACE;;AAIJ;EACE;;AAGF;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAMF;EACE;;AAMN;EAzCF;IA0CI;;;AAGF;EA7CF;IA8CI;IACA;;;AAGF;EAlDF;IAmDI;IACA;;;;AAQE;EACE;;AAIJ;EACE;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;EACA;EACA;;AAIA;EACE;EACA;;AAGF;EACE;;AAON;EAnDF;IAoDI;IACA;IACA;;;AAEF;EAxDF;IAyDI;IACA;;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAKE;EACE;EACA;EACA;;;AAKN;EACE;;;AAGF;AAAA;AAAA;EAGE;;;AAGF;AAAA;EAEE;;AAGE;AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAKN;EACE;IACE;;EAEF;IACE;;;AAIJ;EACE;IACE;;EAEF;IACE;;;AAIJ;EAEE;IACE;IACA;IACA;;;AAIJ;EACE;IACE;;;EAGF;IACE;IACA;;;EAIA;IACE;IACA;;EAGF;IACE;;;AAKN;AAEA;EACE;IACE;;EAEF;IACE;;;AAIJ;EACE;IACE;;EAEF;IACE","file":"admin.css"}1 {"version":3,"sourceRoot":"","sources":["admin.scss"],"names":[],"mappings":";AACE;EACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;;AAIJ;EACE;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;;AAEA;EACE;;AAIA;EACE;;AAGF;EACE;;;AAKN;AAEA;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;AAEA;EACE;EACA;EACA;;;AAIJ;EACE;EACA;EACA;AAEA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EASE;;AARA;EACE;EACA;EACA;EACA;EACA;;;AAQR;EACE;IACE;IACA;;;EAGF;IACE;IACA;IACA;;;EAGF;IACE;IACA;IACA;;;EAGF;IACE;;;AAIJ;EACE;IACE;;;AAIJ;EACE;IACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;AAAA;AAAA;AAIA;EACE;EACA;EACA;;;AAIA;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;;;AAKF;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAIJ;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAIA;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;;AAKN;EACE;IACE;IACA;IACA;IACA;;;AAIJ;EAEI;IACE;IACA;IACA;IACA;;EAGF;IACE;IACA;IACA;IACA;;EAEA;IACE;;;AAMR;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;;;AAIA;EACE;;AAGF;EACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAIA;EACE;;AAGF;EACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAEA;AAAA;EAEE;;AAGF;AAAA;EAEE;;AAGF;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAKN;EACE;EACA;;AAEA;EACE;;AAGF;EACE;;;AAKN;EACE;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;AAEA;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAKF;EACE;;AAGF;EACE;;AAGF;EACE;EACA;EACA;;AAIJ;EACE;;AAEA;EACE;;;AAKN;AAEA;AAEA;AAEA;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;;AAIJ;EACE;;AAEA;EACE;;;AAIJ;EACE;;AAEA;AAAA;EAEE;;AAIA;EACE;EACA;EACA;;AAEA;EAEE;EACA;;AAKN;EACE;;AAGF;EACE;;;AAIJ;EACE;EACA;;;AAGF;EACE;EACA;EACA;;AAEA;EACE;;;AAIJ;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAEA;EACE;;AAKN;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAIJ;EACE;;;AAIJ;EACE;;AAEA;EACE;EACA;;AAGF;EACE;;;AAIJ;EACE;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAOE;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAKF;EACE;;AAKF;EACE;;;AAMR;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;AAIA;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;;AAMN;EACE;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;IACE;;;AAKF;EACE;;AAGF;EACE;;;AAIJ;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAIA;EACE;;AAEA;EACE;EACA;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAIJ;EACE;IACE;;;AAIJ;EACE;IACE;IACA;;;EAGF;IACE;;;AAIJ;EACE;IACE;;EAEA;IACE;IACA;;;EAIJ;IACE;;;EAGF;IACE;;;EAGF;IACE;;;AAIJ;EACE;;;AAIA;EACE;EACA;;AAGF;EACE;;;AAIJ;EACE;IACE;IACA;;;AAIJ;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;AAGE;EACE;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAEA;EACE;;AAIJ;EACE;EACA;;AAGF;EACE;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;;AAEA;EACE;;AAKF;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAGF;EACE;EACA;EACA;;AAIJ;EACE;EACA;EACA;;AAIA;EACE;EACA;EACA;;;AAKN;EAEI;IACE;IACA;IACA;IACA;;EAGF;IACE;IACA;IACA;IACA;;;AAMJ;EACE;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAIJ;EACE;;;AAIJ;EACE;;;AAGF;EACE;EACA;;AAEA;EACE;EACA;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGE;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAIA;EACE;;;AAQV;EACE;EACA;;AAGE;EACE;;AAEA;EACE;;AAIJ;EACE;;AAGF;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAMF;EACE;;AAMN;EAzCF;IA0CI;;;AAGF;EA7CF;IA8CI;IACA;;;AAGF;EAlDF;IAmDI;IACA;;;;AAQE;EACE;;AAIJ;EACE;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;EACA;EACA;;AAIA;EACE;EACA;;AAGF;EACE;;AAON;EAnDF;IAoDI;IACA;IACA;;;AAEF;EAxDF;IAyDI;IACA;;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAKE;EACE;EACA;EACA;;;AAKN;EACE;;;AAGF;AAAA;AAAA;EAGE;;;AAGF;AAAA;EAEE;;AAGE;AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAKN;EACE;IACE;;EAEF;IACE;;;AAIJ;EACE;IACE;;EAEF;IACE;;;AAIJ;EAEE;IACE;IACA;IACA;;;AAIJ;EACE;IACE;;;EAGF;IACE;IACA;;;EAIA;IACE;IACA;;EAGF;IACE;;;AAKN;AAEA;EACE;IACE;;EAEF;IACE;;;AAIJ;EACE;IACE;;EAEF;IACE","file":"admin.css"} -
variation-swatches-for-woocommerce/trunk/assets/css/admin.scss
r2634227 r2653659 396 396 border-top-right-radius: 5px; 397 397 border-bottom-right-radius: 5px; 398 } 399 400 span.sw-input-type-icon { 401 display: block; 402 background: #F0F0F1; 403 height: 28px; 404 padding: 0 7px; 405 position: absolute; 406 line-height: 28px; 407 left: 2px; 408 top: 1px; 409 border-top-left-radius: 5px; 410 border-bottom-left-radius: 5px; 398 411 } 399 412 … … 608 621 display: flex; 609 622 610 .field-with-html-after { 623 .field-with-html-after, 624 .field-with-html-before { 611 625 position: relative; 626 } 627 628 .field-with-html-before { 629 input[type="number"] { 630 padding-left: 27px; 631 width: 65px; 632 -moz-appearance: textfield; 633 634 &::-webkit-outer-spin-button, 635 &::-webkit-inner-spin-button { 636 -webkit-appearance: none; 637 margin: 0; 638 } 639 } 612 640 } 613 641 -
variation-swatches-for-woocommerce/trunk/assets/js/frontend.js
r2634227 r2653659 9 9 var $form = $(this); 10 10 11 if (typeof $form.find(".tawcvs-available-product-variation").data("product_variations") !== "undefined") { 12 $form.data("product_variations", $form.find(".tawcvs-available-product-variation").data("product_variations")) 13 .trigger('reload_product_variations') 14 .trigger('update_variation_values'); 15 } 16 11 17 $form 12 18 .addClass('swatches-support') 13 .data("product_variations", $form.find(".tawcvs-available-product-variation").data("product_variations"))14 .trigger('reload_product_variations')15 19 .on("found_variation", function (event, variation) { 16 20 change_variation_image_on_shop_page($form, variation); … … 78 82 value = $swatch.attr('data-value'); 79 83 84 $swatch.closest('.swatch-item-wrapper').show(); 85 80 86 if (values.indexOf(value) > -1) { 81 87 $swatch.removeClass('disabled'); 82 88 } else { 83 89 $swatch.addClass('disabled'); 84 90 85 91 if ($swatch.closest('.tawcvs-swatches').hasClass('oss-hide')) { 86 92 $swatch.closest('.swatch-item-wrapper').hide(); 87 93 } 88 94 89 95 if ($selected.length && value === $selected.val()) { 90 96 $swatch.removeClass('selected'); … … 104 110 function toggle_hidden_variation_btn() { 105 111 const resetVariationNodes = document.getElementsByClassName('reset_variations'); 106 107 112 if (resetVariationNodes.length) { 108 109 113 Array.prototype.forEach.call(resetVariationNodes, function (resetVariationEle) { 110 111 114 let observer = new MutationObserver(function () { 112 113 115 if (resetVariationEle.style.visibility !== 'hidden') { 114 115 116 resetVariationEle.style.display = 'block'; 116 117 117 } else { 118 119 118 resetVariationEle.style.display = 'none'; 120 121 119 } 122 123 120 }); 124 125 121 observer.observe(resetVariationEle, {attributes: true, childList: true}); 126 127 122 }) 128 129 123 } 130 124 } … … 133 127 var $product = $form.closest('.product'), 134 128 $product_img = $product.find('.woocommerce-LoopProduct-link img'); 135 129 136 130 if ($product_img.length !== 1) { 137 131 return false; … … 168 162 169 163 $(function () { 170 $('.variations_form').tawcvs_variation_swatches_form() ;164 $('.variations_form').tawcvs_variation_swatches_form().trigger('woocommerce_update_variation_values'); 171 165 $(document.body).trigger('tawcvs_initialized'); 172 166 toggle_hidden_variation_btn(); 173 167 }); 174 168 175 $(document).ajaxComplete(function () { 169 $(document).ajaxComplete(function () { 176 170 var $variations_form = $('.variations_form:not(.swatches-support)'); 177 171 if ($variations_form.length > 0) { 178 $variations_form.each(function () {179 $(this).wc_variation_form();180 });172 $variations_form.each(function () { 173 $(this).wc_variation_form(); 174 }); 181 175 $variations_form.tawcvs_variation_swatches_form(); 182 176 } -
variation-swatches-for-woocommerce/trunk/includes/class-frontend.php
r2634227 r2653659 44 44 $this->generalSettings = isset( $latest_option['general'] ) ? $latest_option['general'] : array(); 45 45 $this->archiveSettings = isset( $latest_option['archive'] ) ? $latest_option['archive'] : array(); 46 $this->productDesign = isset( $latest_option['design']['productDesign'] ) ? $latest_option['design']['productDesign'] : array();47 $this->shopDesign = isset( $latest_option['design']['shopDesign'] ) ? $latest_option['design']['shopDesign'] : array();48 $this->toolTipDesign = isset( $latest_option['design']['toolTipDesign'] ) ? $latest_option['design']['toolTipDesign'] : array();46 $this->productDesign = isset( $latest_option['design']['productDesign'] ) ? $latest_option['design']['productDesign'] : array(); 47 $this->shopDesign = isset( $latest_option['design']['shopDesign'] ) ? $latest_option['design']['shopDesign'] : array(); 48 $this->toolTipDesign = isset( $latest_option['design']['toolTipDesign'] ) ? $latest_option['design']['toolTipDesign'] : array(); 49 49 50 50 … … 73 73 return ''; 74 74 } 75 $supported_swatch_types = TA_WCVS()->types;75 $supported_swatch_types = TA_WCVS()->types; 76 76 $dropdown_to_label_setting = isset( $this->generalSettings['dropdown-to-label'] ) && $this->generalSettings['dropdown-to-label']; 77 77 … … 103 103 public function get_available_variation() { 104 104 global $product; 105 106 if ( 'yes' === get_option( 'woocommerce_hide_out_of_stock_items' ) || $this->is_disabled_checking_availability()) { 107 return ''; 108 } 109 105 110 if ( $product instanceof WC_Product_Variable ) { 106 $variations_json = wp_json_encode( $product->get_available_variations() );111 $variations_json = wp_json_encode( TA_WC_Variation_Swatches::get_available_variations( $product, true, true ) ); 107 112 $variations_attr = function_exists( 'wc_esc_json' ) ? wc_esc_json( $variations_json ) : _wp_specialchars( $variations_json, ENT_QUOTES, 'UTF-8', true ); 108 113 if ( ! empty( $variations_attr ) ) { … … 145 150 } 146 151 147 $options = $args['options'];148 $product = $args['product'];152 $options = $args['options']; 153 $product = $args['product']; 149 154 $attribute_tax_name = $args['attribute']; 150 $class = "variation-selector variation-select-{$attr->attribute_type}";151 $swatches = '';152 $is_product_page = is_product();153 $defined_limit = apply_filters( 'tawcvs_swatch_limit_number', 0 );155 $class = "variation-selector variation-select-{$attr->attribute_type}"; 156 $swatches = ''; 157 $is_product_page = is_product(); 158 $defined_limit = apply_filters( 'tawcvs_swatch_limit_number', 0 ); 154 159 $out_of_stock_state = apply_filters( 'tawcvs_out_of_stock_state', '' ); 155 160 … … 161 166 if ( empty( $options ) && ! empty( $product ) && ! empty( $attribute_tax_name ) ) { 162 167 $attributes = $product->get_variation_attributes(); 163 $options = $attributes[ $attribute_tax_name ];168 $options = $attributes[ $attribute_tax_name ]; 164 169 } 165 170 … … 171 176 // Add new option for tooltip to $args variable. 172 177 $args['tooltip'] = apply_filters( 'tawcvs_tooltip_enabled', $this->is_tooltip_enabled() ); 178 173 179 //Get the product variation detail for each attribute 174 180 //If there are more than one attributes, the first one will be applied 175 $collected_variations = TA_WC_Variation_Swatches::get_detailed_product_variations( $product, $attribute_tax_name ); 181 $collected_variations = array(); 182 183 if ( TA_WC_Variation_Swatches::is_pro_addon_active() && ! $this->is_use_attribute_image_only() ) { 184 $collected_variations = TA_WC_Variation_Swatches::get_detailed_product_variations( $product, $attribute_tax_name ); 185 } 176 186 177 187 if ( ! empty( $options ) && taxonomy_exists( $attribute_tax_name ) ) { … … 201 211 202 212 if ( ! empty( $swatches ) ) { 203 $class .= ' hidden';213 $class .= ' hidden'; 204 214 $swatches = '<div class="tawcvs-swatches oss-' . $out_of_stock_state . '" data-attribute_name="attribute_' . esc_attr( $attribute_tax_name ) . '">' . $swatches . '</div>'; 205 $html = '<div class="' . esc_attr( $class ) . '">' . $html . '</div>' . $swatches;215 $html = '<div class="' . esc_attr( $class ) . '">' . $html . '</div>' . $swatches; 206 216 } 207 217 208 218 return $html; 219 } 220 221 private function is_use_attribute_image_only() { 222 return wc_string_to_bool( isset( $this->generalSettings['attribute-image-only'] ) ? $this->generalSettings['attribute-image-only'] : 0 ); 223 } 224 225 private function is_disabled_checking_availability() { 226 return wc_string_to_bool( isset( $this->generalSettings['disable-checking-availability'] ) ? $this->generalSettings['disable-checking-availability'] : 0 ); 209 227 } 210 228 … … 252 270 253 271 $selected = sanitize_title( $args['selected'] ) == $term->slug ? 'selected' : ''; 254 $name = esc_html( apply_filters( 'woocommerce_variation_option_name', $term->name ) );272 $name = esc_html( apply_filters( 'woocommerce_variation_option_name', $term->name ) ); 255 273 256 274 $tooltip = $this->get_tooltip_html( '', $term, $name, $args ); … … 259 277 $swatchShape = isset( $this->generalSettings['swatch-shape'] ) ? $this->generalSettings['swatch-shape'] : 'circle'; 260 278 261 262 279 switch ( $type ) { 263 280 case 'color': 264 $main_color = get_term_meta( $term->term_id, 'color', true );281 $main_color = get_term_meta( $term->term_id, 'color', true ); 265 282 $formatted_color_style = TA_WC_Variation_Swatches::generate_color_style( $term->term_id, $main_color ); 266 283 list( $r, $g, $b ) = sscanf( $main_color, "#%02x%02x%02x" ); 284 285 if ( $this->is_show_label_enabled() ) { 286 $class = ' swatch-label '; 287 $text_shadow = 'text-shadow: -1px -1px 0 #555, 1px -1px 0 #555, -1px 1px 0 #555, 1px 1px 0 #555;'; 288 $color = 'white'; 289 } else { 290 $class = ' swatch-color '; 291 $text_shadow = ''; 292 $color = 'rgba($r,$g,$b,0.5)'; 293 } 294 267 295 $html = sprintf( 268 '<div class="swatch-item-wrapper"><div class="swatch swatch-shape-' . $swatchShape . ' swatch-color swatch-%s %s" style="background:%s;color:%s;" data-value="%s"></div>%s</div>',296 '<div class="swatch-item-wrapper"><div class="swatch swatch-shape-' . $swatchShape . $class . ' swatch-%s %s" style="background:%s;color:%s;' . $text_shadow . '" data-value="%s"><span class="text">%s</span></div>%s</div>', 269 297 esc_attr( $term->slug ), 270 298 $selected, 271 299 esc_attr( $formatted_color_style ), 272 "rgba($r,$g,$b,0.5)", 273 esc_attr( $term->slug ), 300 $color, 301 esc_attr( $term->slug ), 302 $name, 274 303 $tooltip 275 304 ); 276 305 break; 277 278 306 case 'image': 279 307 // First, we check the default thumbnail of attribute variation 280 308 $attach_id = get_term_meta( $term->term_id, 'image', true ); 281 309 if ( ! empty( $attach_id ) ) { 282 $image_url = wp_get_attachment_image_url( $attach_id );310 $image_url = wp_get_attachment_image_url( $attach_id, 'large' ); 283 311 } else { 284 312 //If we also do not have default thumbnail, we will use the placeholder image of WC … … 288 316 289 317 $html = sprintf( 290 '<div class="swatch-item-wrapper"><div class="swatch swatch-shape-' . $swatchShape . ' swatch-image swatch-%s %s %s" data-value="%s" ><img src="%s" alt="%s"></div>%s</div>',318 '<div class="swatch-item-wrapper"><div class="swatch swatch-shape-' . $swatchShape . ' swatch-image swatch-%s %s %s" data-value="%s" style="background-image:url(%s);background-size:cover;%s"></div>%s</div>', 291 319 esc_attr( $term->slug ), 292 320 $selected, … … 294 322 esc_attr( $term->slug ), 295 323 esc_url( $image_url ), 296 esc_attr( $name ),324 ( isset( $this->generalSettings['image-position'] ) ? 'background-position:' . $this->generalSettings['image-position'] . ';' : '' ), // background position 297 325 $tooltip 298 326 ); … … 301 329 $label = get_term_meta( $term->term_id, 'label', true ); 302 330 $label = $label ?: $name; 303 $html = sprintf(331 $html = sprintf( 304 332 '<div class="swatch-item-wrapper"><div class="swatch swatch-shape-' . $swatchShape . ' swatch-label swatch-%s %s" data-value="%s"><span class="text">%s</span></div>%s</div>', 305 333 esc_attr( $term->slug ), … … 346 374 do_action( 'woocommerce_variable_add_to_cart' ); 347 375 echo '</div>'; 376 377 // fix variation doesn't appear on list page 378 add_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart' ); 348 379 } else { 349 380 return $html; … … 363 394 364 395 return wc_string_to_bool( isset( $this->generalSettings['enable-tooltip'] ) ? $this->generalSettings['enable-tooltip'] : 0 ); 396 } 397 /** 398 * 399 * Return the boolean to check if show label on color swatches is enabled in General Settings page 400 * 401 * @return bool 402 */ 403 public function is_show_label_enabled() { 404 if ( isset( $this->generalSettings['show-label-on-color-swatches'] ) && $this->generalSettings['show-label-on-color-swatches'] == 1 && TA_WC_Variation_Swatches::is_pro_addon_active() ) { 405 return true; 406 } else { 407 return false; 408 } 365 409 } 366 410 -
variation-swatches-for-woocommerce/trunk/includes/class-setting-fields-manager.php
r2618453 r2653659 102 102 ), 103 103 array( 104 'title' => __( 'Show label inside swatches', 'wcvs' ), 105 'fields' => array( 106 array( 107 'id' => 'wcvs-show-label-on-color-swatches', 108 'type' => 'checkbox', 109 'name' => 'show-label-on-color-swatches', 110 ) 111 ), 112 'class' => 'indent', 113 'field_to_check' => 'wcvs-enable-color-swatches', 114 'desc' => __( 'Show the label for color swatches', 'wcvs' ), 115 'show_if_checked' => true, 116 'priority' => 1.2, 117 'is_pro_feature' => true, 118 ), 119 array( 104 120 'title' => __( 'Enable Image Swatches', 'wcvs' ), 105 121 'fields' => array( … … 174 190 ), 175 191 array( 192 'title' => __( 'Disable checking the variation product availability', 'wcvs' ), 193 'fields' => array( 194 array( 195 'id' => 'wcvs-disable-checking-availability', 196 'type' => 'checkbox', 197 'name' => 'disable-checking-availability', 198 ) 199 ), 200 'desc' => __( 'All variations will be shown as available to select.', 'wcvs' ), 201 'priority' => 4.1 202 ), 203 array( 176 204 'title' => __( 'Choose your swatch shape', 'wcvs' ), 177 205 'fields' => array( … … 259 287 ), 260 288 array( 289 'title' => __( 'Image position', 'woosuite-variation-swatches-pro' ), 290 'fields' => array( 291 array( 292 'id' => 'wcvs-image-position-pro', 293 'type' => 'select', 294 'options_group' => array( 295 array( 296 'value' => 'default', 297 'label' => __( 'Default', 'woosuite-variation-swatches-pro' ), 298 ) 299 ), 300 'class' => 'br-type', 301 'name' => 'image-position', 302 ) 303 ), 304 'desc' => __( 'Select option', 'woosuite-variation-swatches-pro' ), 305 'priority' => 5.2, 306 'is_pro_feature' => true, 307 ), 308 array( 261 309 'title' => __( 'Disable Default Plugin Stylesheet', 'wcvs' ), 262 310 'fields' => array( … … 417 465 'type' => 'number', 418 466 'name' => 'mar-top', 419 'default_value' => '0' 467 'default_value' => '0', 468 'html_before' => '<span class="sw-input-type-icon">↑</span>' 420 469 ), 421 470 array( … … 423 472 'type' => 'number', 424 473 'name' => 'mar-right', 425 'default_value' => '15' 474 'default_value' => '15', 475 'html_before' => '<span class="sw-input-type-icon">→</span>' 426 476 ), 427 477 array( … … 429 479 'type' => 'number', 430 480 'name' => 'mar-bottom', 431 'default_value' => '15' 481 'default_value' => '15', 482 'html_before' => '<span class="sw-input-type-icon">↓</span>' 432 483 ), 433 484 array( … … 435 486 'type' => 'number', 436 487 'name' => 'mar-left', 437 'default_value' => '0' 488 'default_value' => '0', 489 'html_before' => '<span class="sw-input-type-icon">←</span>' 438 490 ), 439 491 array( … … 471 523 'type' => 'number', 472 524 'name' => 'pad-top', 473 'default_value' => '0' 525 'default_value' => '0', 526 'html_before' => '<span class="sw-input-type-icon">↑</span>' 474 527 ), 475 528 array( … … 477 530 'type' => 'number', 478 531 'name' => 'pad-right', 479 'default_value' => '0' 532 'default_value' => '0', 533 'html_before' => '<span class="sw-input-type-icon">→</span>' 480 534 ), 481 535 array( … … 483 537 'type' => 'number', 484 538 'name' => 'pad-bottom', 485 'default_value' => '0' 539 'default_value' => '0', 540 'html_before' => '<span class="sw-input-type-icon">↓</span>' 486 541 ), 487 542 array( … … 489 544 'type' => 'number', 490 545 'name' => 'pad-left', 491 'default_value' => '0' 546 'default_value' => '0', 547 'html_before' => '<span class="sw-input-type-icon">←</span>' 492 548 ), 493 549 array( … … 525 581 'type' => 'number', 526 582 'name' => 'wrm-top', 527 'default_value' => '0' 583 'default_value' => '0', 584 'html_before' => '<span class="sw-input-type-icon">↑</span>' 528 585 ), 529 586 array( … … 531 588 'type' => 'number', 532 589 'name' => 'wrm-right', 533 'default_value' => '15' 590 'default_value' => '15', 591 'html_before' => '<span class="sw-input-type-icon">→</span>' 534 592 ), 535 593 array( … … 537 595 'type' => 'number', 538 596 'name' => 'wrm-bottom', 539 'default_value' => '15' 597 'default_value' => '15', 598 'html_before' => '<span class="sw-input-type-icon">↓</span>' 540 599 ), 541 600 array( … … 543 602 'type' => 'number', 544 603 'name' => 'wrm-left', 545 'default_value' => '0' 604 'default_value' => '0', 605 'html_before' => '<span class="sw-input-type-icon">←</span>' 546 606 ), 547 607 array( … … 579 639 'type' => 'number', 580 640 'name' => 'wrp-top', 581 'default_value' => '0' 641 'default_value' => '0', 642 'html_before' => '<span class="sw-input-type-icon">↑</span>' 582 643 ), 583 644 array( … … 585 646 'type' => 'number', 586 647 'name' => 'wrp-right', 587 'default_value' => '0' 648 'default_value' => '0', 649 'html_before' => '<span class="sw-input-type-icon">→</span>' 588 650 ), 589 651 array( … … 591 653 'type' => 'number', 592 654 'name' => 'wrp-bottom', 593 'default_value' => '0' 655 'default_value' => '0', 656 'html_before' => '<span class="sw-input-type-icon">↓</span>' 594 657 ), 595 658 array( … … 597 660 'type' => 'number', 598 661 'name' => 'wrp-left', 599 'default_value' => '0' 662 'default_value' => '0', 663 'html_before' => '<span class="sw-input-type-icon">←</span>' 600 664 ), 601 665 array( … … 757 821 'type' => 'number', 758 822 'name' => 'mar-top', 759 'default_value' => '0' 823 'default_value' => '0', 824 'html_before' => '<span class="sw-input-type-icon">↑</span>' 760 825 ), 761 826 array( … … 763 828 'type' => 'number', 764 829 'name' => 'mar-right', 765 'default_value' => '15' 830 'default_value' => '15', 831 'html_before' => '<span class="sw-input-type-icon">→</span>' 766 832 ), 767 833 array( … … 769 835 'type' => 'number', 770 836 'name' => 'mar-bottom', 771 'default_value' => '15' 837 'default_value' => '15', 838 'html_before' => '<span class="sw-input-type-icon">↓</span>' 772 839 ), 773 840 array( … … 775 842 'type' => 'number', 776 843 'name' => 'mar-left', 777 'default_value' => '0' 844 'default_value' => '0', 845 'html_before' => '<span class="sw-input-type-icon">←</span>' 778 846 ), 779 847 array( … … 811 879 'type' => 'number', 812 880 'name' => 'pad-top', 813 'default_value' => '0' 881 'default_value' => '0', 882 'html_before' => '<span class="sw-input-type-icon">↑</span>' 814 883 ), 815 884 array( … … 817 886 'type' => 'number', 818 887 'name' => 'pad-right', 819 'default_value' => '0' 888 'default_value' => '0', 889 'html_before' => '<span class="sw-input-type-icon">→</span>' 820 890 ), 821 891 array( … … 823 893 'type' => 'number', 824 894 'name' => 'pad-bottom', 825 'default_value' => '0' 895 'default_value' => '0', 896 'html_before' => '<span class="sw-input-type-icon">↓</span>' 826 897 ), 827 898 array( … … 829 900 'type' => 'number', 830 901 'name' => 'pad-left', 831 'default_value' => '0' 902 'default_value' => '0', 903 'html_before' => '<span class="sw-input-type-icon">←</span>' 832 904 ), 833 905 array( … … 865 937 'type' => 'number', 866 938 'name' => 'wrm-top', 867 'default_value' => '0' 939 'default_value' => '0', 940 'html_before' => '<span class="sw-input-type-icon">↑</span>' 868 941 ), 869 942 array( … … 871 944 'type' => 'number', 872 945 'name' => 'wrm-right', 873 'default_value' => '15' 946 'default_value' => '15', 947 'html_before' => '<span class="sw-input-type-icon">→</span>' 874 948 ), 875 949 array( … … 877 951 'type' => 'number', 878 952 'name' => 'wrm-bottom', 879 'default_value' => '15' 953 'default_value' => '15', 954 'html_before' => '<span class="sw-input-type-icon">↓</span>' 880 955 ), 881 956 array( … … 883 958 'type' => 'number', 884 959 'name' => 'wrm-left', 885 'default_value' => '0' 960 'default_value' => '0', 961 'html_before' => '<span class="sw-input-type-icon">←</span>' 886 962 ), 887 963 array( … … 919 995 'type' => 'number', 920 996 'name' => 'wrp-top', 921 'default_value' => '0' 997 'default_value' => '0', 998 'html_before' => '<span class="sw-input-type-icon">↑</span>' 922 999 ), 923 1000 array( … … 925 1002 'type' => 'number', 926 1003 'name' => 'wrp-right', 927 'default_value' => '0' 1004 'default_value' => '0', 1005 'html_before' => '<span class="sw-input-type-icon">→</span>' 928 1006 ), 929 1007 array( … … 931 1009 'type' => 'number', 932 1010 'name' => 'wrp-bottom', 933 'default_value' => '0' 1011 'default_value' => '0', 1012 'html_before' => '<span class="sw-input-type-icon">↓</span>' 934 1013 ), 935 1014 array( … … 937 1016 'type' => 'number', 938 1017 'name' => 'wrp-left', 939 'default_value' => '0' 1018 'default_value' => '0', 1019 'html_before' => '<span class="sw-input-type-icon">←</span>' 940 1020 ), 941 1021 array( -
variation-swatches-for-woocommerce/trunk/includes/class-setting-fields-renderer.php
r2614321 r2653659 142 142 'field_to_check' => '', 143 143 'placeholder' => '', 144 'html_before' => '', 144 145 'html_after' => '', 145 146 'html' => '', … … 343 344 ob_start(); 344 345 echo empty( $args['html_after'] ) ? '' : '<div class="field-with-html-after">'; 345 ?> 346 echo empty( $args['html_before'] ) ? '' : '<div class="field-with-html-before">'; 347 348 echo empty( $args['html_before'] ) ? '' : $args['html_before']; 349 ?> 346 350 <input type="number" 347 351 name="<?php echo $field_name; ?>" … … 354 358 value="<?php echo $field_value; ?>"> 355 359 <?php 360 echo empty( $args['html_before'] ) ? '' : '</div>'; 356 361 echo empty( $args['html_after'] ) ? '' : $args['html_after'] . '</div>'; 357 362 -
variation-swatches-for-woocommerce/trunk/includes/class-variation-swatches.php
r2634227 r2653659 189 189 $field_value = isset( $current_options[ $section_id ][ $field_name . '-' . $att->attribute_name ] ) ? $current_options[ $section_id ][ $field_name . '-' . $att->attribute_name ] : ''; 190 190 } 191 $field_id = $field_name . '-' . $att->attribute_name;191 $field_id = $field_name . '-' . $att->attribute_name; 192 192 $field_name_modified = $field_name_prefix . '[' . $field_name . '-' . $att->attribute_name . ']'; 193 193 … … 224 224 } 225 225 $collected_variations = array(); 226 $variations = self::get_available_variations( $product );226 $variations = self::get_available_variations( $product ); 227 227 228 228 if ( ! empty( $variations ) ) { … … 246 246 * @return array[]|WC_Product_Variation[] 247 247 */ 248 public static function get_available_variations( $product ) {248 public static function get_available_variations( $product, $ignore_out_of_stock = false, $get_full_attribute_data = false ) { 249 249 if ( ! $product instanceof WC_Product_Variable ) { 250 250 return array(); … … 265 265 266 266 // Hide out of stock variations if 'Hide out of stock items from the catalog' is checked. 267 if ( ! $variation || ! $variation->exists() ) {267 if ( ! $variation || ! $variation->exists() || ( $ignore_out_of_stock && ! $variation->is_in_stock() ) ) { 268 268 continue; 269 269 } … … 274 274 continue; 275 275 } 276 277 $available_variations[] = array( 278 'attributes' => $variation->get_variation_attributes(), 279 'variation_id' => $variation_id 280 ); 276 if ( $get_full_attribute_data ) { 277 $available_variations[] = $product->get_available_variation( $variation_id ); 278 } else { 279 $available_variations[] = array( 280 'attributes' => $variation->get_variation_attributes(), 281 'variation_id' => $variation_id, 282 ); 283 } 281 284 } 282 285 -
variation-swatches-for-woocommerce/trunk/readme.txt
r2634227 r2653659 4 4 Requires at least: 4.5 5 5 Tested up to: 5.8.2 6 Stable tag: 2.1. 26 Stable tag: 2.1.3 7 7 WC requires at least: 3.2.0 8 WC tested up to: 5.9.08 WC tested up to: 6.0.0 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 54 54 55 55 56 Visit <a href="https://woosuite.com/blog/" rel="friend" title="WPBeginner">the Woosuite blog</a> to learn from our <a href="https://woosuite.com/woocommerce/" rel="friend" title="WooCommerce Tutorials">WordPress Tutorials</a> and find out about other <a href="https://woosuite.com/plugins/" rel="friend" title="Best WordPress Plugins">WooCommerce plugins</a>.56 Visit <a href="https://woosuite.com/blog/" rel="friend">the Woosuite blog</a> to learn from our <a href="https://woosuite.com/woocommerce/" rel="friend" title="WooCommerce Tutorials">WordPress Tutorials</a> and find out about other <a href="https://woosuite.com/plugins/" rel="friend" title="Best WordPress Plugins">WooCommerce plugins</a>. 57 57 58 58 … … 104 104 105 105 == Changelog == 106 = 2.1.3 = 107 * Fixed firefox showing unavailable sizes 108 * Create option for image position for swatches 109 * Added arrows for the margin and padding setting fields 110 * Fix swatches not resetting appearance on click event 111 * Add option to use variable image only 112 * Add an option to disable checking variation availability 113 106 114 = 2.1.2 = 107 115 * Remove inline styles when disable plugin styling is active -
variation-swatches-for-woocommerce/trunk/templates/admin/welcome-popup.php
r2634227 r2653659 7 7 <div class="popup-content"> 8 8 <div class="popup-inner-content"> 9 <p><strong>Congratulations on updating to v2.1. 2!</strong></p>10 <p> We’ve been quiet on this end for several days as we’ve been hard at work making our plugin even better for you…</p>9 <p><strong>Congratulations on updating to v2.1.3!</strong></p> 10 <p>And Happy New Year🎉 We’ve been quiet on this end for several weeks as we’ve been hard at work making our plugin even better for you…</p> 11 11 <p>Based on your feedback, we have added a bunch of new features and enhancements with a lot more to go.</p> 12 <p><a href="https://woosuite.com/news/variation-swatches- v2-1-2-update/" target="_blank" rel="noopener noreferrer nofollow"> Click here to learn more. </a></p>12 <p><a href="https://woosuite.com/news/variation-swatches-updates/" target="_blank" rel="noopener noreferrer nofollow"> Click here to learn more. </a></p> 13 13 <p>If you experience any issues, please get in touch with support so we can make it right: <a href="https://woosuite.com/support/" target="_blank" rel="noopener noreferrer nofollow">Support</a></p> 14 14 </div> -
variation-swatches-for-woocommerce/trunk/variation-swatches-for-woocommerce.php
r2634227 r2653659 4 4 * Plugin URI: https://woosuite.com/plugins/woocommerce-variation-swatches/ 5 5 * Description: Creates variation swatches for WooCommerce, converts your variation dropdown into color, label, or photo swatches with ease, The original Variation Swatches for WooCommerce. 6 * Version: 2.1. 26 * Version: 2.1.3 7 7 * Author: Woosuite 8 8 * Author URI: https://woosuite.com/ … … 12 12 * Domain Path: /languages 13 13 * WC requires at least: 3.0.0 14 * WC tested up to: 5.9.014 * WC tested up to: 6.0.0 15 15 * 16 16 * License: GPLv2 or later … … 28 28 29 29 if ( ! defined( 'WCVS_PLUGIN_VERSION' ) ) { 30 define( 'WCVS_PLUGIN_VERSION', '2.1. 2' );30 define( 'WCVS_PLUGIN_VERSION', '2.1.3' ); 31 31 } 32 32
Note: See TracChangeset
for help on using the changeset viewer.