Plugin Directory

Changeset 2653659


Ignore:
Timestamp:
01/06/2022 04:00:37 PM (4 years ago)
Author:
themealien
Message:

Update to version 2.1.3 from GitHub

Location:
variation-swatches-for-woocommerce
Files:
22 edited
1 copied

Legend:

Unmodified
Added
Removed
  • variation-swatches-for-woocommerce/tags/2.1.3/assets/css/admin.css

    r2634227 r2653659  
    355355}
    356356
     357span.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
    357370input.font-size-input {
    358371  width: 70px;
     
    535548  display: flex;
    536549}
    537 .variation-switch-field .field-with-html-after {
     550.variation-switch-field .field-with-html-after,
     551.variation-switch-field .field-with-html-before {
    538552  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;
    539562}
    540563.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  
    396396  border-top-right-radius: 5px;
    397397  border-bottom-right-radius: 5px;
     398}
     399
     400span.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;
    398411}
    399412
     
    608621  display: flex;
    609622
    610   .field-with-html-after {
     623  .field-with-html-after,
     624  .field-with-html-before {
    611625    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    }
    612640  }
    613641
  • variation-swatches-for-woocommerce/tags/2.1.3/assets/js/frontend.js

    r2634227 r2653659  
    99            var $form = $(this);
    1010
     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
    1117            $form
    1218                .addClass('swatches-support')
    13                 .data("product_variations", $form.find(".tawcvs-available-product-variation").data("product_variations"))
    14                 .trigger('reload_product_variations')
    1519                .on("found_variation", function (event, variation) {
    1620                    change_variation_image_on_shop_page($form, variation);
     
    7882                                    value = $swatch.attr('data-value');
    7983
     84                                $swatch.closest('.swatch-item-wrapper').show();
     85
    8086                                if (values.indexOf(value) > -1) {
    8187                                    $swatch.removeClass('disabled');
    8288                                } else {
    8389                                    $swatch.addClass('disabled');
    84                                    
     90
    8591                                    if ($swatch.closest('.tawcvs-swatches').hasClass('oss-hide')) {
    8692                                        $swatch.closest('.swatch-item-wrapper').hide();
    8793                                    }
    88                                    
     94
    8995                                    if ($selected.length && value === $selected.val()) {
    9096                                        $swatch.removeClass('selected');
     
    104110    function toggle_hidden_variation_btn() {
    105111        const resetVariationNodes = document.getElementsByClassName('reset_variations');
    106 
    107112        if (resetVariationNodes.length) {
    108 
    109113            Array.prototype.forEach.call(resetVariationNodes, function (resetVariationEle) {
    110 
    111114                let observer = new MutationObserver(function () {
    112 
    113115                    if (resetVariationEle.style.visibility !== 'hidden') {
    114 
    115116                        resetVariationEle.style.display = 'block';
    116 
    117117                    } else {
    118 
    119118                        resetVariationEle.style.display = 'none';
    120 
    121119                    }
    122 
    123120                });
    124 
    125121                observer.observe(resetVariationEle, {attributes: true, childList: true});
    126 
    127122            })
    128 
    129123        }
    130124    }
     
    133127        var $product = $form.closest('.product'),
    134128            $product_img = $product.find('.woocommerce-LoopProduct-link img');
    135        
     129
    136130        if ($product_img.length !== 1) {
    137131            return false;
     
    168162
    169163    $(function () {
    170         $('.variations_form').tawcvs_variation_swatches_form();
     164        $('.variations_form').tawcvs_variation_swatches_form().trigger('woocommerce_update_variation_values');
    171165        $(document.body).trigger('tawcvs_initialized');
    172166        toggle_hidden_variation_btn();
    173167    });
    174168
    175     $(document).ajaxComplete(function () { 
     169    $(document).ajaxComplete(function () {
    176170        var $variations_form = $('.variations_form:not(.swatches-support)');
    177171        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            });
    181175            $variations_form.tawcvs_variation_swatches_form();
    182176        }
  • variation-swatches-for-woocommerce/tags/2.1.3/includes/class-frontend.php

    r2634227 r2653659  
    4444        $this->generalSettings = isset( $latest_option['general'] ) ? $latest_option['general'] : array();
    4545        $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();
    4949
    5050
     
    7373            return '';
    7474        }
    75         $supported_swatch_types    = TA_WCVS()->types;
     75        $supported_swatch_types = TA_WCVS()->types;
    7676        $dropdown_to_label_setting = isset( $this->generalSettings['dropdown-to-label'] ) && $this->generalSettings['dropdown-to-label'];
    7777
     
    103103    public function get_available_variation() {
    104104        global $product;
     105
     106        if ( 'yes' === get_option( 'woocommerce_hide_out_of_stock_items' ) || $this->is_disabled_checking_availability()) {
     107            return '';
     108        }
     109
    105110        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 ) );
    107112            $variations_attr = function_exists( 'wc_esc_json' ) ? wc_esc_json( $variations_json ) : _wp_specialchars( $variations_json, ENT_QUOTES, 'UTF-8', true );
    108113            if ( ! empty( $variations_attr ) ) {
     
    145150        }
    146151
    147         $options            = $args['options'];
    148         $product            = $args['product'];
     152        $options = $args['options'];
     153        $product = $args['product'];
    149154        $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 );
    154159        $out_of_stock_state = apply_filters( 'tawcvs_out_of_stock_state', '' );
    155160
     
    161166        if ( empty( $options ) && ! empty( $product ) && ! empty( $attribute_tax_name ) ) {
    162167            $attributes = $product->get_variation_attributes();
    163             $options    = $attributes[ $attribute_tax_name ];
     168            $options = $attributes[ $attribute_tax_name ];
    164169        }
    165170
     
    171176        // Add new option for tooltip to $args variable.
    172177        $args['tooltip'] = apply_filters( 'tawcvs_tooltip_enabled', $this->is_tooltip_enabled() );
     178
    173179        //Get the product variation detail for each attribute
    174180        //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        }
    176186
    177187        if ( ! empty( $options ) && taxonomy_exists( $attribute_tax_name ) ) {
     
    201211
    202212        if ( ! empty( $swatches ) ) {
    203             $class    .= ' hidden';
     213            $class .= ' hidden';
    204214            $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;
    206216        }
    207217
    208218        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 );
    209227    }
    210228
     
    252270
    253271        $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 ) );
    255273
    256274        $tooltip = $this->get_tooltip_html( '', $term, $name, $args );
     
    259277        $swatchShape = isset( $this->generalSettings['swatch-shape'] ) ? $this->generalSettings['swatch-shape'] : 'circle';
    260278
    261 
    262279        switch ( $type ) {
    263280            case 'color':
    264                 $main_color            = get_term_meta( $term->term_id, 'color', true );
     281                $main_color = get_term_meta( $term->term_id, 'color', true );
    265282                $formatted_color_style = TA_WC_Variation_Swatches::generate_color_style( $term->term_id, $main_color );
    266283                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
    267295                $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>',
    269297                    esc_attr( $term->slug ),
    270298                    $selected,
    271299                    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,
    274303                    $tooltip
    275304                );
    276305                break;
    277 
    278306            case 'image':
    279307                // First, we check the default thumbnail of attribute variation
    280308                $attach_id = get_term_meta( $term->term_id, 'image', true );
    281309                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' );
    283311                } else {
    284312                    //If we also do not have default thumbnail, we will use the placeholder image of WC
     
    288316
    289317                $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>',
    291319                    esc_attr( $term->slug ),
    292320                    $selected,
     
    294322                    esc_attr( $term->slug ),
    295323                    esc_url( $image_url ),
    296                     esc_attr( $name ),
     324                    ( isset( $this->generalSettings['image-position'] ) ? 'background-position:' . $this->generalSettings['image-position'] . ';' : '' ), // background position
    297325                    $tooltip
    298326                );
     
    301329                $label = get_term_meta( $term->term_id, 'label', true );
    302330                $label = $label ?: $name;
    303                 $html  = sprintf(
     331                $html = sprintf(
    304332                    '<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>',
    305333                    esc_attr( $term->slug ),
     
    346374            do_action( 'woocommerce_variable_add_to_cart' );
    347375            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' );
    348379        } else {
    349380            return $html;
     
    363394
    364395        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        }
    365409    }
    366410
  • variation-swatches-for-woocommerce/tags/2.1.3/includes/class-setting-fields-manager.php

    r2618453 r2653659  
    102102                    ),
    103103                    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(
    104120                        'title'    => __( 'Enable Image Swatches', 'wcvs' ),
    105121                        'fields'   => array(
     
    174190                    ),
    175191                    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(
    176204                        'title'    => __( 'Choose your swatch shape', 'wcvs' ),
    177205                        'fields'   => array(
     
    259287                    ),
    260288                    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(
    261309                        'title'    => __( 'Disable Default Plugin Stylesheet', 'wcvs' ),
    262310                        'fields'   => array(
     
    417465                                    'type'          => 'number',
    418466                                    'name'          => 'mar-top',
    419                                     'default_value' => '0'
     467                                    'default_value' => '0',
     468                                    'html_before'    => '<span class="sw-input-type-icon">&uarr;</span>'
    420469                                ),
    421470                                array(
     
    423472                                    'type'          => 'number',
    424473                                    'name'          => 'mar-right',
    425                                     'default_value' => '15'
     474                                    'default_value' => '15',
     475                                    'html_before'    => '<span class="sw-input-type-icon">&rarr;</span>'
    426476                                ),
    427477                                array(
     
    429479                                    'type'          => 'number',
    430480                                    'name'          => 'mar-bottom',
    431                                     'default_value' => '15'
     481                                    'default_value' => '15',
     482                                    'html_before'    => '<span class="sw-input-type-icon">&darr;</span>'
    432483                                ),
    433484                                array(
     
    435486                                    'type'          => 'number',
    436487                                    'name'          => 'mar-left',
    437                                     'default_value' => '0'
     488                                    'default_value' => '0',
     489                                    'html_before'    => '<span class="sw-input-type-icon">&larr;</span>'
    438490                                ),
    439491                                array(
     
    471523                                    'type'          => 'number',
    472524                                    'name'          => 'pad-top',
    473                                     'default_value' => '0'
     525                                    'default_value' => '0',
     526                                    'html_before'    => '<span class="sw-input-type-icon">&uarr;</span>'
    474527                                ),
    475528                                array(
     
    477530                                    'type'          => 'number',
    478531                                    'name'          => 'pad-right',
    479                                     'default_value' => '0'
     532                                    'default_value' => '0',
     533                                    'html_before'    => '<span class="sw-input-type-icon">&rarr;</span>'
    480534                                ),
    481535                                array(
     
    483537                                    'type'          => 'number',
    484538                                    'name'          => 'pad-bottom',
    485                                     'default_value' => '0'
     539                                    'default_value' => '0',
     540                                    'html_before'    => '<span class="sw-input-type-icon">&darr;</span>'
    486541                                ),
    487542                                array(
     
    489544                                    'type'          => 'number',
    490545                                    'name'          => 'pad-left',
    491                                     'default_value' => '0'
     546                                    'default_value' => '0',
     547                                    'html_before'    => '<span class="sw-input-type-icon">&larr;</span>'
    492548                                ),
    493549                                array(
     
    525581                                    'type'          => 'number',
    526582                                    'name'          => 'wrm-top',
    527                                     'default_value' => '0'
     583                                    'default_value' => '0',
     584                                    'html_before'    => '<span class="sw-input-type-icon">&uarr;</span>'
    528585                                ),
    529586                                array(
     
    531588                                    'type'          => 'number',
    532589                                    'name'          => 'wrm-right',
    533                                     'default_value' => '15'
     590                                    'default_value' => '15',
     591                                    'html_before'    => '<span class="sw-input-type-icon">&rarr;</span>'
    534592                                ),
    535593                                array(
     
    537595                                    'type'          => 'number',
    538596                                    'name'          => 'wrm-bottom',
    539                                     'default_value' => '15'
     597                                    'default_value' => '15',
     598                                    'html_before'    => '<span class="sw-input-type-icon">&darr;</span>'
    540599                                ),
    541600                                array(
     
    543602                                    'type'          => 'number',
    544603                                    'name'          => 'wrm-left',
    545                                     'default_value' => '0'
     604                                    'default_value' => '0',
     605                                    'html_before'    => '<span class="sw-input-type-icon">&larr;</span>'
    546606                                ),
    547607                                array(
     
    579639                                    'type'          => 'number',
    580640                                    'name'          => 'wrp-top',
    581                                     'default_value' => '0'
     641                                    'default_value' => '0',
     642                                    'html_before'    => '<span class="sw-input-type-icon">&uarr;</span>'
    582643                                ),
    583644                                array(
     
    585646                                    'type'          => 'number',
    586647                                    'name'          => 'wrp-right',
    587                                     'default_value' => '0'
     648                                    'default_value' => '0',
     649                                    'html_before'    => '<span class="sw-input-type-icon">&rarr;</span>'
    588650                                ),
    589651                                array(
     
    591653                                    'type'          => 'number',
    592654                                    'name'          => 'wrp-bottom',
    593                                     'default_value' => '0'
     655                                    'default_value' => '0',
     656                                    'html_before'    => '<span class="sw-input-type-icon">&darr;</span>'
    594657                                ),
    595658                                array(
     
    597660                                    'type'          => 'number',
    598661                                    'name'          => 'wrp-left',
    599                                     'default_value' => '0'
     662                                    'default_value' => '0',
     663                                    'html_before'    => '<span class="sw-input-type-icon">&larr;</span>'
    600664                                ),
    601665                                array(
     
    757821                                    'type'          => 'number',
    758822                                    'name'          => 'mar-top',
    759                                     'default_value' => '0'
     823                                    'default_value' => '0',
     824                                    'html_before'    => '<span class="sw-input-type-icon">&uarr;</span>'
    760825                                ),
    761826                                array(
     
    763828                                    'type'          => 'number',
    764829                                    'name'          => 'mar-right',
    765                                     'default_value' => '15'
     830                                    'default_value' => '15',
     831                                    'html_before'    => '<span class="sw-input-type-icon">&rarr;</span>'
    766832                                ),
    767833                                array(
     
    769835                                    'type'          => 'number',
    770836                                    'name'          => 'mar-bottom',
    771                                     'default_value' => '15'
     837                                    'default_value' => '15',
     838                                    'html_before'    => '<span class="sw-input-type-icon">&darr;</span>'
    772839                                ),
    773840                                array(
     
    775842                                    'type'          => 'number',
    776843                                    'name'          => 'mar-left',
    777                                     'default_value' => '0'
     844                                    'default_value' => '0',
     845                                    'html_before'    => '<span class="sw-input-type-icon">&larr;</span>'
    778846                                ),
    779847                                array(
     
    811879                                    'type'          => 'number',
    812880                                    'name'          => 'pad-top',
    813                                     'default_value' => '0'
     881                                    'default_value' => '0',
     882                                    'html_before'    => '<span class="sw-input-type-icon">&uarr;</span>'
    814883                                ),
    815884                                array(
     
    817886                                    'type'          => 'number',
    818887                                    'name'          => 'pad-right',
    819                                     'default_value' => '0'
     888                                    'default_value' => '0',
     889                                    'html_before'    => '<span class="sw-input-type-icon">&rarr;</span>'
    820890                                ),
    821891                                array(
     
    823893                                    'type'          => 'number',
    824894                                    'name'          => 'pad-bottom',
    825                                     'default_value' => '0'
     895                                    'default_value' => '0',
     896                                    'html_before'    => '<span class="sw-input-type-icon">&darr;</span>'
    826897                                ),
    827898                                array(
     
    829900                                    'type'          => 'number',
    830901                                    'name'          => 'pad-left',
    831                                     'default_value' => '0'
     902                                    'default_value' => '0',
     903                                    'html_before'    => '<span class="sw-input-type-icon">&larr;</span>'
    832904                                ),
    833905                                array(
     
    865937                                    'type'          => 'number',
    866938                                    'name'          => 'wrm-top',
    867                                     'default_value' => '0'
     939                                    'default_value' => '0',
     940                                    'html_before'    => '<span class="sw-input-type-icon">&uarr;</span>'
    868941                                ),
    869942                                array(
     
    871944                                    'type'          => 'number',
    872945                                    'name'          => 'wrm-right',
    873                                     'default_value' => '15'
     946                                    'default_value' => '15',
     947                                    'html_before'    => '<span class="sw-input-type-icon">&rarr;</span>'
    874948                                ),
    875949                                array(
     
    877951                                    'type'          => 'number',
    878952                                    'name'          => 'wrm-bottom',
    879                                     'default_value' => '15'
     953                                    'default_value' => '15',
     954                                    'html_before'    => '<span class="sw-input-type-icon">&darr;</span>'
    880955                                ),
    881956                                array(
     
    883958                                    'type'          => 'number',
    884959                                    'name'          => 'wrm-left',
    885                                     'default_value' => '0'
     960                                    'default_value' => '0',
     961                                    'html_before'    => '<span class="sw-input-type-icon">&larr;</span>'
    886962                                ),
    887963                                array(
     
    919995                                    'type'          => 'number',
    920996                                    'name'          => 'wrp-top',
    921                                     'default_value' => '0'
     997                                    'default_value' => '0',
     998                                    'html_before'    => '<span class="sw-input-type-icon">&uarr;</span>'
    922999                                ),
    9231000                                array(
     
    9251002                                    'type'          => 'number',
    9261003                                    'name'          => 'wrp-right',
    927                                     'default_value' => '0'
     1004                                    'default_value' => '0',
     1005                                    'html_before'    => '<span class="sw-input-type-icon">&rarr;</span>'
    9281006                                ),
    9291007                                array(
     
    9311009                                    'type'          => 'number',
    9321010                                    'name'          => 'wrp-bottom',
    933                                     'default_value' => '0'
     1011                                    'default_value' => '0',
     1012                                    'html_before'    => '<span class="sw-input-type-icon">&darr;</span>'
    9341013                                ),
    9351014                                array(
     
    9371016                                    'type'          => 'number',
    9381017                                    'name'          => 'wrp-left',
    939                                     'default_value' => '0'
     1018                                    'default_value' => '0',
     1019                                    'html_before'    => '<span class="sw-input-type-icon">&larr;</span>'
    9401020                                ),
    9411021                                array(
  • variation-swatches-for-woocommerce/tags/2.1.3/includes/class-setting-fields-renderer.php

    r2614321 r2653659  
    142142                'field_to_check'    => '',
    143143                'placeholder'       => '',
     144                'html_before'        => '',
    144145                'html_after'        => '',
    145146                'html'              => '',
     
    343344            ob_start();
    344345            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            ?>
    346350            <input type="number"
    347351                   name="<?php echo $field_name; ?>"
     
    354358                   value="<?php echo $field_value; ?>">
    355359            <?php
     360            echo empty( $args['html_before'] ) ? '' : '</div>';
    356361            echo empty( $args['html_after'] ) ? '' : $args['html_after'] . '</div>';
    357362
  • variation-swatches-for-woocommerce/tags/2.1.3/includes/class-variation-swatches.php

    r2634227 r2653659  
    189189                $field_value = isset( $current_options[ $section_id ][ $field_name . '-' . $att->attribute_name ] ) ? $current_options[ $section_id ][ $field_name . '-' . $att->attribute_name ] : '';
    190190            }
    191             $field_id            = $field_name . '-' . $att->attribute_name;
     191            $field_id = $field_name . '-' . $att->attribute_name;
    192192            $field_name_modified = $field_name_prefix . '[' . $field_name . '-' . $att->attribute_name . ']';
    193193
     
    224224        }
    225225        $collected_variations = array();
    226         $variations           = self::get_available_variations( $product );
     226        $variations = self::get_available_variations( $product );
    227227
    228228        if ( ! empty( $variations ) ) {
     
    246246     * @return array[]|WC_Product_Variation[]
    247247     */
    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 ) {
    249249        if ( ! $product instanceof WC_Product_Variable ) {
    250250            return array();
     
    265265
    266266            // 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() ) ) {
    268268                continue;
    269269            }
     
    274274                continue;
    275275            }
    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            }
    281284        }
    282285
  • variation-swatches-for-woocommerce/tags/2.1.3/readme.txt

    r2634227 r2653659  
    44Requires at least: 4.5
    55Tested up to: 5.8.2
    6 Stable tag: 2.1.2
     6Stable tag: 2.1.3
    77WC requires at least: 3.2.0
    8 WC tested up to: 5.9.0
     8WC tested up to: 6.0.0
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    5454
    5555
    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>.
     56Visit <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>.
    5757
    5858
     
    104104
    105105== 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
    106114= 2.1.2 =
    107115* Remove inline styles when disable plugin styling is active
  • variation-swatches-for-woocommerce/tags/2.1.3/templates/admin/welcome-popup.php

    r2634227 r2653659  
    77        <div class="popup-content">
    88            <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>
    1111                <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>
    1313                <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>
    1414            </div>
  • variation-swatches-for-woocommerce/tags/2.1.3/variation-swatches-for-woocommerce.php

    r2634227 r2653659  
    44 * Plugin URI: https://woosuite.com/plugins/woocommerce-variation-swatches/
    55 * 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.2
     6 * Version: 2.1.3
    77 * Author: Woosuite
    88 * Author URI: https://woosuite.com/
     
    1212 * Domain Path: /languages
    1313 * WC requires at least: 3.0.0
    14  * WC tested up to: 5.9.0
     14 * WC tested up to: 6.0.0
    1515 *
    1616 * License: GPLv2 or later
     
    2828
    2929if ( ! defined( 'WCVS_PLUGIN_VERSION' ) ) {
    30     define( 'WCVS_PLUGIN_VERSION', '2.1.2' );
     30    define( 'WCVS_PLUGIN_VERSION', '2.1.3' );
    3131}
    3232
  • variation-swatches-for-woocommerce/trunk/assets/css/admin.css

    r2634227 r2653659  
    355355}
    356356
     357span.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
    357370input.font-size-input {
    358371  width: 70px;
     
    535548  display: flex;
    536549}
    537 .variation-switch-field .field-with-html-after {
     550.variation-switch-field .field-with-html-after,
     551.variation-switch-field .field-with-html-before {
    538552  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;
    539562}
    540563.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  
    396396  border-top-right-radius: 5px;
    397397  border-bottom-right-radius: 5px;
     398}
     399
     400span.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;
    398411}
    399412
     
    608621  display: flex;
    609622
    610   .field-with-html-after {
     623  .field-with-html-after,
     624  .field-with-html-before {
    611625    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    }
    612640  }
    613641
  • variation-swatches-for-woocommerce/trunk/assets/js/frontend.js

    r2634227 r2653659  
    99            var $form = $(this);
    1010
     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
    1117            $form
    1218                .addClass('swatches-support')
    13                 .data("product_variations", $form.find(".tawcvs-available-product-variation").data("product_variations"))
    14                 .trigger('reload_product_variations')
    1519                .on("found_variation", function (event, variation) {
    1620                    change_variation_image_on_shop_page($form, variation);
     
    7882                                    value = $swatch.attr('data-value');
    7983
     84                                $swatch.closest('.swatch-item-wrapper').show();
     85
    8086                                if (values.indexOf(value) > -1) {
    8187                                    $swatch.removeClass('disabled');
    8288                                } else {
    8389                                    $swatch.addClass('disabled');
    84                                    
     90
    8591                                    if ($swatch.closest('.tawcvs-swatches').hasClass('oss-hide')) {
    8692                                        $swatch.closest('.swatch-item-wrapper').hide();
    8793                                    }
    88                                    
     94
    8995                                    if ($selected.length && value === $selected.val()) {
    9096                                        $swatch.removeClass('selected');
     
    104110    function toggle_hidden_variation_btn() {
    105111        const resetVariationNodes = document.getElementsByClassName('reset_variations');
    106 
    107112        if (resetVariationNodes.length) {
    108 
    109113            Array.prototype.forEach.call(resetVariationNodes, function (resetVariationEle) {
    110 
    111114                let observer = new MutationObserver(function () {
    112 
    113115                    if (resetVariationEle.style.visibility !== 'hidden') {
    114 
    115116                        resetVariationEle.style.display = 'block';
    116 
    117117                    } else {
    118 
    119118                        resetVariationEle.style.display = 'none';
    120 
    121119                    }
    122 
    123120                });
    124 
    125121                observer.observe(resetVariationEle, {attributes: true, childList: true});
    126 
    127122            })
    128 
    129123        }
    130124    }
     
    133127        var $product = $form.closest('.product'),
    134128            $product_img = $product.find('.woocommerce-LoopProduct-link img');
    135        
     129
    136130        if ($product_img.length !== 1) {
    137131            return false;
     
    168162
    169163    $(function () {
    170         $('.variations_form').tawcvs_variation_swatches_form();
     164        $('.variations_form').tawcvs_variation_swatches_form().trigger('woocommerce_update_variation_values');
    171165        $(document.body).trigger('tawcvs_initialized');
    172166        toggle_hidden_variation_btn();
    173167    });
    174168
    175     $(document).ajaxComplete(function () { 
     169    $(document).ajaxComplete(function () {
    176170        var $variations_form = $('.variations_form:not(.swatches-support)');
    177171        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            });
    181175            $variations_form.tawcvs_variation_swatches_form();
    182176        }
  • variation-swatches-for-woocommerce/trunk/includes/class-frontend.php

    r2634227 r2653659  
    4444        $this->generalSettings = isset( $latest_option['general'] ) ? $latest_option['general'] : array();
    4545        $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();
    4949
    5050
     
    7373            return '';
    7474        }
    75         $supported_swatch_types    = TA_WCVS()->types;
     75        $supported_swatch_types = TA_WCVS()->types;
    7676        $dropdown_to_label_setting = isset( $this->generalSettings['dropdown-to-label'] ) && $this->generalSettings['dropdown-to-label'];
    7777
     
    103103    public function get_available_variation() {
    104104        global $product;
     105
     106        if ( 'yes' === get_option( 'woocommerce_hide_out_of_stock_items' ) || $this->is_disabled_checking_availability()) {
     107            return '';
     108        }
     109
    105110        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 ) );
    107112            $variations_attr = function_exists( 'wc_esc_json' ) ? wc_esc_json( $variations_json ) : _wp_specialchars( $variations_json, ENT_QUOTES, 'UTF-8', true );
    108113            if ( ! empty( $variations_attr ) ) {
     
    145150        }
    146151
    147         $options            = $args['options'];
    148         $product            = $args['product'];
     152        $options = $args['options'];
     153        $product = $args['product'];
    149154        $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 );
    154159        $out_of_stock_state = apply_filters( 'tawcvs_out_of_stock_state', '' );
    155160
     
    161166        if ( empty( $options ) && ! empty( $product ) && ! empty( $attribute_tax_name ) ) {
    162167            $attributes = $product->get_variation_attributes();
    163             $options    = $attributes[ $attribute_tax_name ];
     168            $options = $attributes[ $attribute_tax_name ];
    164169        }
    165170
     
    171176        // Add new option for tooltip to $args variable.
    172177        $args['tooltip'] = apply_filters( 'tawcvs_tooltip_enabled', $this->is_tooltip_enabled() );
     178
    173179        //Get the product variation detail for each attribute
    174180        //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        }
    176186
    177187        if ( ! empty( $options ) && taxonomy_exists( $attribute_tax_name ) ) {
     
    201211
    202212        if ( ! empty( $swatches ) ) {
    203             $class    .= ' hidden';
     213            $class .= ' hidden';
    204214            $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;
    206216        }
    207217
    208218        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 );
    209227    }
    210228
     
    252270
    253271        $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 ) );
    255273
    256274        $tooltip = $this->get_tooltip_html( '', $term, $name, $args );
     
    259277        $swatchShape = isset( $this->generalSettings['swatch-shape'] ) ? $this->generalSettings['swatch-shape'] : 'circle';
    260278
    261 
    262279        switch ( $type ) {
    263280            case 'color':
    264                 $main_color            = get_term_meta( $term->term_id, 'color', true );
     281                $main_color = get_term_meta( $term->term_id, 'color', true );
    265282                $formatted_color_style = TA_WC_Variation_Swatches::generate_color_style( $term->term_id, $main_color );
    266283                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
    267295                $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>',
    269297                    esc_attr( $term->slug ),
    270298                    $selected,
    271299                    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,
    274303                    $tooltip
    275304                );
    276305                break;
    277 
    278306            case 'image':
    279307                // First, we check the default thumbnail of attribute variation
    280308                $attach_id = get_term_meta( $term->term_id, 'image', true );
    281309                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' );
    283311                } else {
    284312                    //If we also do not have default thumbnail, we will use the placeholder image of WC
     
    288316
    289317                $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>',
    291319                    esc_attr( $term->slug ),
    292320                    $selected,
     
    294322                    esc_attr( $term->slug ),
    295323                    esc_url( $image_url ),
    296                     esc_attr( $name ),
     324                    ( isset( $this->generalSettings['image-position'] ) ? 'background-position:' . $this->generalSettings['image-position'] . ';' : '' ), // background position
    297325                    $tooltip
    298326                );
     
    301329                $label = get_term_meta( $term->term_id, 'label', true );
    302330                $label = $label ?: $name;
    303                 $html  = sprintf(
     331                $html = sprintf(
    304332                    '<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>',
    305333                    esc_attr( $term->slug ),
     
    346374            do_action( 'woocommerce_variable_add_to_cart' );
    347375            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' );
    348379        } else {
    349380            return $html;
     
    363394
    364395        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        }
    365409    }
    366410
  • variation-swatches-for-woocommerce/trunk/includes/class-setting-fields-manager.php

    r2618453 r2653659  
    102102                    ),
    103103                    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(
    104120                        'title'    => __( 'Enable Image Swatches', 'wcvs' ),
    105121                        'fields'   => array(
     
    174190                    ),
    175191                    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(
    176204                        'title'    => __( 'Choose your swatch shape', 'wcvs' ),
    177205                        'fields'   => array(
     
    259287                    ),
    260288                    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(
    261309                        'title'    => __( 'Disable Default Plugin Stylesheet', 'wcvs' ),
    262310                        'fields'   => array(
     
    417465                                    'type'          => 'number',
    418466                                    'name'          => 'mar-top',
    419                                     'default_value' => '0'
     467                                    'default_value' => '0',
     468                                    'html_before'    => '<span class="sw-input-type-icon">&uarr;</span>'
    420469                                ),
    421470                                array(
     
    423472                                    'type'          => 'number',
    424473                                    'name'          => 'mar-right',
    425                                     'default_value' => '15'
     474                                    'default_value' => '15',
     475                                    'html_before'    => '<span class="sw-input-type-icon">&rarr;</span>'
    426476                                ),
    427477                                array(
     
    429479                                    'type'          => 'number',
    430480                                    'name'          => 'mar-bottom',
    431                                     'default_value' => '15'
     481                                    'default_value' => '15',
     482                                    'html_before'    => '<span class="sw-input-type-icon">&darr;</span>'
    432483                                ),
    433484                                array(
     
    435486                                    'type'          => 'number',
    436487                                    'name'          => 'mar-left',
    437                                     'default_value' => '0'
     488                                    'default_value' => '0',
     489                                    'html_before'    => '<span class="sw-input-type-icon">&larr;</span>'
    438490                                ),
    439491                                array(
     
    471523                                    'type'          => 'number',
    472524                                    'name'          => 'pad-top',
    473                                     'default_value' => '0'
     525                                    'default_value' => '0',
     526                                    'html_before'    => '<span class="sw-input-type-icon">&uarr;</span>'
    474527                                ),
    475528                                array(
     
    477530                                    'type'          => 'number',
    478531                                    'name'          => 'pad-right',
    479                                     'default_value' => '0'
     532                                    'default_value' => '0',
     533                                    'html_before'    => '<span class="sw-input-type-icon">&rarr;</span>'
    480534                                ),
    481535                                array(
     
    483537                                    'type'          => 'number',
    484538                                    'name'          => 'pad-bottom',
    485                                     'default_value' => '0'
     539                                    'default_value' => '0',
     540                                    'html_before'    => '<span class="sw-input-type-icon">&darr;</span>'
    486541                                ),
    487542                                array(
     
    489544                                    'type'          => 'number',
    490545                                    'name'          => 'pad-left',
    491                                     'default_value' => '0'
     546                                    'default_value' => '0',
     547                                    'html_before'    => '<span class="sw-input-type-icon">&larr;</span>'
    492548                                ),
    493549                                array(
     
    525581                                    'type'          => 'number',
    526582                                    'name'          => 'wrm-top',
    527                                     'default_value' => '0'
     583                                    'default_value' => '0',
     584                                    'html_before'    => '<span class="sw-input-type-icon">&uarr;</span>'
    528585                                ),
    529586                                array(
     
    531588                                    'type'          => 'number',
    532589                                    'name'          => 'wrm-right',
    533                                     'default_value' => '15'
     590                                    'default_value' => '15',
     591                                    'html_before'    => '<span class="sw-input-type-icon">&rarr;</span>'
    534592                                ),
    535593                                array(
     
    537595                                    'type'          => 'number',
    538596                                    'name'          => 'wrm-bottom',
    539                                     'default_value' => '15'
     597                                    'default_value' => '15',
     598                                    'html_before'    => '<span class="sw-input-type-icon">&darr;</span>'
    540599                                ),
    541600                                array(
     
    543602                                    'type'          => 'number',
    544603                                    'name'          => 'wrm-left',
    545                                     'default_value' => '0'
     604                                    'default_value' => '0',
     605                                    'html_before'    => '<span class="sw-input-type-icon">&larr;</span>'
    546606                                ),
    547607                                array(
     
    579639                                    'type'          => 'number',
    580640                                    'name'          => 'wrp-top',
    581                                     'default_value' => '0'
     641                                    'default_value' => '0',
     642                                    'html_before'    => '<span class="sw-input-type-icon">&uarr;</span>'
    582643                                ),
    583644                                array(
     
    585646                                    'type'          => 'number',
    586647                                    'name'          => 'wrp-right',
    587                                     'default_value' => '0'
     648                                    'default_value' => '0',
     649                                    'html_before'    => '<span class="sw-input-type-icon">&rarr;</span>'
    588650                                ),
    589651                                array(
     
    591653                                    'type'          => 'number',
    592654                                    'name'          => 'wrp-bottom',
    593                                     'default_value' => '0'
     655                                    'default_value' => '0',
     656                                    'html_before'    => '<span class="sw-input-type-icon">&darr;</span>'
    594657                                ),
    595658                                array(
     
    597660                                    'type'          => 'number',
    598661                                    'name'          => 'wrp-left',
    599                                     'default_value' => '0'
     662                                    'default_value' => '0',
     663                                    'html_before'    => '<span class="sw-input-type-icon">&larr;</span>'
    600664                                ),
    601665                                array(
     
    757821                                    'type'          => 'number',
    758822                                    'name'          => 'mar-top',
    759                                     'default_value' => '0'
     823                                    'default_value' => '0',
     824                                    'html_before'    => '<span class="sw-input-type-icon">&uarr;</span>'
    760825                                ),
    761826                                array(
     
    763828                                    'type'          => 'number',
    764829                                    'name'          => 'mar-right',
    765                                     'default_value' => '15'
     830                                    'default_value' => '15',
     831                                    'html_before'    => '<span class="sw-input-type-icon">&rarr;</span>'
    766832                                ),
    767833                                array(
     
    769835                                    'type'          => 'number',
    770836                                    'name'          => 'mar-bottom',
    771                                     'default_value' => '15'
     837                                    'default_value' => '15',
     838                                    'html_before'    => '<span class="sw-input-type-icon">&darr;</span>'
    772839                                ),
    773840                                array(
     
    775842                                    'type'          => 'number',
    776843                                    'name'          => 'mar-left',
    777                                     'default_value' => '0'
     844                                    'default_value' => '0',
     845                                    'html_before'    => '<span class="sw-input-type-icon">&larr;</span>'
    778846                                ),
    779847                                array(
     
    811879                                    'type'          => 'number',
    812880                                    'name'          => 'pad-top',
    813                                     'default_value' => '0'
     881                                    'default_value' => '0',
     882                                    'html_before'    => '<span class="sw-input-type-icon">&uarr;</span>'
    814883                                ),
    815884                                array(
     
    817886                                    'type'          => 'number',
    818887                                    'name'          => 'pad-right',
    819                                     'default_value' => '0'
     888                                    'default_value' => '0',
     889                                    'html_before'    => '<span class="sw-input-type-icon">&rarr;</span>'
    820890                                ),
    821891                                array(
     
    823893                                    'type'          => 'number',
    824894                                    'name'          => 'pad-bottom',
    825                                     'default_value' => '0'
     895                                    'default_value' => '0',
     896                                    'html_before'    => '<span class="sw-input-type-icon">&darr;</span>'
    826897                                ),
    827898                                array(
     
    829900                                    'type'          => 'number',
    830901                                    'name'          => 'pad-left',
    831                                     'default_value' => '0'
     902                                    'default_value' => '0',
     903                                    'html_before'    => '<span class="sw-input-type-icon">&larr;</span>'
    832904                                ),
    833905                                array(
     
    865937                                    'type'          => 'number',
    866938                                    'name'          => 'wrm-top',
    867                                     'default_value' => '0'
     939                                    'default_value' => '0',
     940                                    'html_before'    => '<span class="sw-input-type-icon">&uarr;</span>'
    868941                                ),
    869942                                array(
     
    871944                                    'type'          => 'number',
    872945                                    'name'          => 'wrm-right',
    873                                     'default_value' => '15'
     946                                    'default_value' => '15',
     947                                    'html_before'    => '<span class="sw-input-type-icon">&rarr;</span>'
    874948                                ),
    875949                                array(
     
    877951                                    'type'          => 'number',
    878952                                    'name'          => 'wrm-bottom',
    879                                     'default_value' => '15'
     953                                    'default_value' => '15',
     954                                    'html_before'    => '<span class="sw-input-type-icon">&darr;</span>'
    880955                                ),
    881956                                array(
     
    883958                                    'type'          => 'number',
    884959                                    'name'          => 'wrm-left',
    885                                     'default_value' => '0'
     960                                    'default_value' => '0',
     961                                    'html_before'    => '<span class="sw-input-type-icon">&larr;</span>'
    886962                                ),
    887963                                array(
     
    919995                                    'type'          => 'number',
    920996                                    'name'          => 'wrp-top',
    921                                     'default_value' => '0'
     997                                    'default_value' => '0',
     998                                    'html_before'    => '<span class="sw-input-type-icon">&uarr;</span>'
    922999                                ),
    9231000                                array(
     
    9251002                                    'type'          => 'number',
    9261003                                    'name'          => 'wrp-right',
    927                                     'default_value' => '0'
     1004                                    'default_value' => '0',
     1005                                    'html_before'    => '<span class="sw-input-type-icon">&rarr;</span>'
    9281006                                ),
    9291007                                array(
     
    9311009                                    'type'          => 'number',
    9321010                                    'name'          => 'wrp-bottom',
    933                                     'default_value' => '0'
     1011                                    'default_value' => '0',
     1012                                    'html_before'    => '<span class="sw-input-type-icon">&darr;</span>'
    9341013                                ),
    9351014                                array(
     
    9371016                                    'type'          => 'number',
    9381017                                    'name'          => 'wrp-left',
    939                                     'default_value' => '0'
     1018                                    'default_value' => '0',
     1019                                    'html_before'    => '<span class="sw-input-type-icon">&larr;</span>'
    9401020                                ),
    9411021                                array(
  • variation-swatches-for-woocommerce/trunk/includes/class-setting-fields-renderer.php

    r2614321 r2653659  
    142142                'field_to_check'    => '',
    143143                'placeholder'       => '',
     144                'html_before'        => '',
    144145                'html_after'        => '',
    145146                'html'              => '',
     
    343344            ob_start();
    344345            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            ?>
    346350            <input type="number"
    347351                   name="<?php echo $field_name; ?>"
     
    354358                   value="<?php echo $field_value; ?>">
    355359            <?php
     360            echo empty( $args['html_before'] ) ? '' : '</div>';
    356361            echo empty( $args['html_after'] ) ? '' : $args['html_after'] . '</div>';
    357362
  • variation-swatches-for-woocommerce/trunk/includes/class-variation-swatches.php

    r2634227 r2653659  
    189189                $field_value = isset( $current_options[ $section_id ][ $field_name . '-' . $att->attribute_name ] ) ? $current_options[ $section_id ][ $field_name . '-' . $att->attribute_name ] : '';
    190190            }
    191             $field_id            = $field_name . '-' . $att->attribute_name;
     191            $field_id = $field_name . '-' . $att->attribute_name;
    192192            $field_name_modified = $field_name_prefix . '[' . $field_name . '-' . $att->attribute_name . ']';
    193193
     
    224224        }
    225225        $collected_variations = array();
    226         $variations           = self::get_available_variations( $product );
     226        $variations = self::get_available_variations( $product );
    227227
    228228        if ( ! empty( $variations ) ) {
     
    246246     * @return array[]|WC_Product_Variation[]
    247247     */
    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 ) {
    249249        if ( ! $product instanceof WC_Product_Variable ) {
    250250            return array();
     
    265265
    266266            // 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() ) ) {
    268268                continue;
    269269            }
     
    274274                continue;
    275275            }
    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            }
    281284        }
    282285
  • variation-swatches-for-woocommerce/trunk/readme.txt

    r2634227 r2653659  
    44Requires at least: 4.5
    55Tested up to: 5.8.2
    6 Stable tag: 2.1.2
     6Stable tag: 2.1.3
    77WC requires at least: 3.2.0
    8 WC tested up to: 5.9.0
     8WC tested up to: 6.0.0
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    5454
    5555
    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>.
     56Visit <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>.
    5757
    5858
     
    104104
    105105== 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
    106114= 2.1.2 =
    107115* Remove inline styles when disable plugin styling is active
  • variation-swatches-for-woocommerce/trunk/templates/admin/welcome-popup.php

    r2634227 r2653659  
    77        <div class="popup-content">
    88            <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>
    1111                <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>
    1313                <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>
    1414            </div>
  • variation-swatches-for-woocommerce/trunk/variation-swatches-for-woocommerce.php

    r2634227 r2653659  
    44 * Plugin URI: https://woosuite.com/plugins/woocommerce-variation-swatches/
    55 * 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.2
     6 * Version: 2.1.3
    77 * Author: Woosuite
    88 * Author URI: https://woosuite.com/
     
    1212 * Domain Path: /languages
    1313 * WC requires at least: 3.0.0
    14  * WC tested up to: 5.9.0
     14 * WC tested up to: 6.0.0
    1515 *
    1616 * License: GPLv2 or later
     
    2828
    2929if ( ! defined( 'WCVS_PLUGIN_VERSION' ) ) {
    30     define( 'WCVS_PLUGIN_VERSION', '2.1.2' );
     30    define( 'WCVS_PLUGIN_VERSION', '2.1.3' );
    3131}
    3232
Note: See TracChangeset for help on using the changeset viewer.