Variation Swatches for WooCommerce by CartFlows - Version 1.0.5

Version Description

TUESDAY, 18th OCTOBER 2022 = * Fixed - Compatibility issues with WP Sheet Editor Taxonomy Terms Pro. * Fixed - Fatal error with Astra theme. * Fixed - Variation price disappears on shop page.

Download this release

Release Info

Developer brainstormworg
Plugin Icon Variation Swatches for WooCommerce by CartFlows
Version 1.0.5
Comparing to
See all releases

Code changes from version 1.0.4 to 1.0.5

admin/attributes-config.php CHANGED
@@ -66,6 +66,10 @@ class Attributes_Config {
66
  * @since 1.0.0
67
  */
68
  public function add_swatch_types( $fields ) {
 
 
 
 
69
  $current_screen = get_current_screen();
70
 
71
  if ( isset( $current_screen->base ) && 'product_page_product_attributes' === $current_screen->base ) {
66
  * @since 1.0.0
67
  */
68
  public function add_swatch_types( $fields ) {
69
+ if ( ! function_exists( 'get_current_screen' ) ) {
70
+ return $fields;
71
+ }
72
+
73
  $current_screen = get_current_screen();
74
 
75
  if ( isset( $current_screen->base ) && 'product_page_product_attributes' === $current_screen->base ) {
assets/js/swatches.js CHANGED
@@ -518,6 +518,9 @@
518
  }
519
 
520
  function updatePrice( swatch, variation ) {
 
 
 
521
  if ( swatch.parents( 'li' ).find( '.cfvsw-original-price' ).length ) {
522
  const price = swatch.parents( 'li' ).find( '.price' );
523
  price.replaceWith( variation.price_html );
518
  }
519
 
520
  function updatePrice( swatch, variation ) {
521
+ if ( 0 === variation.price_html.length ) {
522
+ return;
523
+ }
524
  if ( swatch.parents( 'li' ).find( '.cfvsw-original-price' ).length ) {
525
  const price = swatch.parents( 'li' ).find( '.price' );
526
  price.replaceWith( variation.price_html );
changelog.txt ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ = 1.0.5 – TUESDAY, 18th OCTOBER 2022 =
2
+ * Fixed - Compatibility issues with WP Sheet Editor – Taxonomy Terms Pro.
3
+ * Fixed - Fatal error with Astra theme.
4
+ * Fixed - Variation price disappears on shop page.
5
+
6
+ = 1.0.4 – WEDNESDAY, 7th SEPTEMBER 2022 =
7
+ * Improvement - Supports WooCommerce shortcodes.
8
+ * Improvement - Astra's swap mode working on disabling swatches on shop page.
9
+ * Improvement - Increased variation threshold to 200.
10
+ * Fixed - Admin UI breaking on edit product page.
11
+ * Fixed - Settings page UI issue on attribute edit.
12
+
13
+ = 1.0.3 – WEDNESDAY, 24th AUGUST 2022 =
14
+ * Feature - Disable out of stock terms.
15
+ * Feature - Catalog mode for shop page.
16
+ * Improvement - Admin UI improvements.
17
+ * Improvement - Supports Astra's infinite scroll mode.
18
+ * Fixed - Issue selecting multiple options on shop page.
19
+ * Fixed - Thumbnail dimension on shop page.
20
+
21
+ = 1.0.2 – TUESDAY, 9th AUGUST 2022 =
22
+ * Feature - Customize variation swatches from the edit product page.
23
+ * Improvement - Updated swatches' spacing.
24
+ * Improvement - Maintain swatches order on frontend as per settings.
25
+ * Improvement - Added RTL support for the settings page.
26
+
27
+ = 1.0.1 – THURSDAY, 21st JULY 2022 =
28
+ * Improvement - Support for Astra upsells on cart page.
29
+
30
+ = 1.0.0 – FRIDAY, 15th JULY 2022 =
31
+ * Initial release.
compatibility/astra.php CHANGED
@@ -81,6 +81,10 @@ class Astra {
81
  * @since 1.0.1
82
  */
83
  public function is_required_astra_page( $status ) {
 
 
 
 
84
  if ( ! astra_get_option( 'enable-cart-upsells' ) ) {
85
  return $status;
86
  }
81
  * @since 1.0.1
82
  */
83
  public function is_required_astra_page( $status ) {
84
+ if ( ! function_exists( 'astra_get_option' ) ) {
85
+ return $status;
86
+ }
87
+
88
  if ( ! astra_get_option( 'enable-cart-upsells' ) ) {
89
  return $status;
90
  }
languages/variation-swatches-woo.pot CHANGED
@@ -2,14 +2,14 @@
2
  # This file is distributed under the GPL v2.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Variation Swatches for WooCommerce 1.0.4\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/variation-swatches-woo\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2022-09-07T11:17:49+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.6.0\n"
15
  "X-Domain: variation-swatches-woo\n"
@@ -33,7 +33,7 @@ msgid "https://cartflows.com/"
33
  msgstr ""
34
 
35
  #: admin-core/admin-menu.php:62
36
- #: admin/attributes-config.php:243
37
  #: plugin-loader.php:198
38
  #: admin-core/assets/build/settings.js:1
39
  #: admin-core/assets/src/components/Header.js:11
@@ -41,7 +41,7 @@ msgid "Settings"
41
  msgstr ""
42
 
43
  #: admin-core/admin-menu.php:63
44
- #: admin/attributes-config.php:243
45
  #: admin-core/assets/build/settings.js:1
46
  #: admin-core/assets/src/components/Header.js:31
47
  msgid "Variation Swatches"
@@ -59,141 +59,141 @@ msgstr ""
59
  msgid "Failed to save settings."
60
  msgstr ""
61
 
62
- #: admin/attributes-config.php:75
63
  msgid "Select"
64
  msgstr ""
65
 
66
- #: admin/attributes-config.php:76
67
  #: admin/templates.php:67
68
  #: admin-core/assets/build/settings.js:1
69
  #: admin-core/assets/src/components/tabs/GlobalStyling.js:197
70
  msgid "Label"
71
  msgstr ""
72
 
73
- #: admin/attributes-config.php:77
74
  #: admin/templates.php:68
75
  #: admin/templates.php:396
76
  #: admin/term-meta-config.php:136
77
  msgid "Color"
78
  msgstr ""
79
 
80
- #: admin/attributes-config.php:78
81
  #: admin/templates.php:69
82
  #: admin/templates.php:406
83
  #: admin/term-meta-config.php:142
84
  msgid "Image"
85
  msgstr ""
86
 
87
- #: admin/attributes-config.php:108
88
  msgid "Preview"
89
  msgstr ""
90
 
91
- #: admin/attributes-config.php:162
92
  #: admin/templates.php:228
93
  #: admin/templates.php:295
94
  msgid "Default"
95
  msgstr ""
96
 
97
- #: admin/attributes-config.php:163
98
  msgid "Square"
99
  msgstr ""
100
 
101
- #: admin/attributes-config.php:164
102
  msgid "Rounded Corner"
103
  msgstr ""
104
 
105
- #: admin/attributes-config.php:165
106
  msgid "Circle"
107
  msgstr ""
108
 
109
- #: admin/attributes-config.php:169
110
  msgid "Custom"
111
  msgstr ""
112
 
113
- #: admin/attributes-config.php:176
114
- #: admin/attributes-config.php:245
115
  msgid "Shape"
116
  msgstr ""
117
 
118
- #: admin/attributes-config.php:187
119
- #: admin/attributes-config.php:254
120
  msgid "Default setting is applied from settings page."
121
  msgstr ""
122
 
123
- #: admin/attributes-config.php:188
124
- #: admin/attributes-config.php:255
125
  msgid "Swatch will appear as Square."
126
  msgstr ""
127
 
128
- #: admin/attributes-config.php:189
129
- #: admin/attributes-config.php:256
130
  msgid "Swatch will appear as Square with slight curvature at border of 3px."
131
  msgstr ""
132
 
133
- #: admin/attributes-config.php:190
134
- #: admin/attributes-config.php:257
135
  msgid "Swatch will appear as Circle"
136
  msgstr ""
137
 
138
- #: admin/attributes-config.php:191
139
- #: admin/attributes-config.php:258
140
  msgid "Create custom Swatch shape by choosing different height and width"
141
  msgstr ""
142
 
143
- #: admin/attributes-config.php:196
144
- #: admin/attributes-config.php:261
145
  msgid "Size (Optional)"
146
  msgstr ""
147
 
148
- #: admin/attributes-config.php:200
149
  msgid "Control the size of this particular attribute. Default size is 24px"
150
  msgstr ""
151
 
152
- #: admin/attributes-config.php:205
153
- #: admin/attributes-config.php:223
154
- #: admin/attributes-config.php:266
155
  msgid "Height (Optional)"
156
  msgstr ""
157
 
158
- #: admin/attributes-config.php:209
159
  msgid "Control the height of this particular attribute. Default height is 24px"
160
  msgstr ""
161
 
162
- #: admin/attributes-config.php:214
163
- #: admin/attributes-config.php:232
164
- #: admin/attributes-config.php:271
165
  msgid "Width (Optional)"
166
  msgstr ""
167
 
168
- #: admin/attributes-config.php:218
169
  msgid "Control the width of this particular attribute. Default width is 24px"
170
  msgstr ""
171
 
172
- #: admin/attributes-config.php:227
173
  msgid "Control the height of this particular attribute. Default height is 30px"
174
  msgstr ""
175
 
176
- #: admin/attributes-config.php:236
177
  msgid "Control the width of this particular attribute. Default width is 30px"
178
  msgstr ""
179
 
180
- #: admin/attributes-config.php:263
181
  msgid "Control the size of this particular attribute. Default size is 24px"
182
  msgstr ""
183
 
184
- #: admin/attributes-config.php:268
185
  msgid "Control the height of this particular attribute. Default height is 24px"
186
  msgstr ""
187
 
188
- #: admin/attributes-config.php:273
189
  msgid "Control the width of this particular attribute. Default width is 24px"
190
  msgstr ""
191
 
192
- #: admin/attributes-config.php:329
193
  msgid "Swatches Settings"
194
  msgstr ""
195
 
196
- #: admin/attributes-config.php:330
197
  msgid "Choose how this attribute should appear in frontend."
198
  msgstr ""
199
 
2
  # This file is distributed under the GPL v2.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Variation Swatches for WooCommerce 1.0.5\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/variation-swatches-woo\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2022-10-18T10:07:30+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.6.0\n"
15
  "X-Domain: variation-swatches-woo\n"
33
  msgstr ""
34
 
35
  #: admin-core/admin-menu.php:62
36
+ #: admin/attributes-config.php:247
37
  #: plugin-loader.php:198
38
  #: admin-core/assets/build/settings.js:1
39
  #: admin-core/assets/src/components/Header.js:11
41
  msgstr ""
42
 
43
  #: admin-core/admin-menu.php:63
44
+ #: admin/attributes-config.php:247
45
  #: admin-core/assets/build/settings.js:1
46
  #: admin-core/assets/src/components/Header.js:31
47
  msgid "Variation Swatches"
59
  msgid "Failed to save settings."
60
  msgstr ""
61
 
62
+ #: admin/attributes-config.php:79
63
  msgid "Select"
64
  msgstr ""
65
 
66
+ #: admin/attributes-config.php:80
67
  #: admin/templates.php:67
68
  #: admin-core/assets/build/settings.js:1
69
  #: admin-core/assets/src/components/tabs/GlobalStyling.js:197
70
  msgid "Label"
71
  msgstr ""
72
 
73
+ #: admin/attributes-config.php:81
74
  #: admin/templates.php:68
75
  #: admin/templates.php:396
76
  #: admin/term-meta-config.php:136
77
  msgid "Color"
78
  msgstr ""
79
 
80
+ #: admin/attributes-config.php:82
81
  #: admin/templates.php:69
82
  #: admin/templates.php:406
83
  #: admin/term-meta-config.php:142
84
  msgid "Image"
85
  msgstr ""
86
 
87
+ #: admin/attributes-config.php:112
88
  msgid "Preview"
89
  msgstr ""
90
 
91
+ #: admin/attributes-config.php:166
92
  #: admin/templates.php:228
93
  #: admin/templates.php:295
94
  msgid "Default"
95
  msgstr ""
96
 
97
+ #: admin/attributes-config.php:167
98
  msgid "Square"
99
  msgstr ""
100
 
101
+ #: admin/attributes-config.php:168
102
  msgid "Rounded Corner"
103
  msgstr ""
104
 
105
+ #: admin/attributes-config.php:169
106
  msgid "Circle"
107
  msgstr ""
108
 
109
+ #: admin/attributes-config.php:173
110
  msgid "Custom"
111
  msgstr ""
112
 
113
+ #: admin/attributes-config.php:180
114
+ #: admin/attributes-config.php:249
115
  msgid "Shape"
116
  msgstr ""
117
 
118
+ #: admin/attributes-config.php:191
119
+ #: admin/attributes-config.php:258
120
  msgid "Default setting is applied from settings page."
121
  msgstr ""
122
 
123
+ #: admin/attributes-config.php:192
124
+ #: admin/attributes-config.php:259
125
  msgid "Swatch will appear as Square."
126
  msgstr ""
127
 
128
+ #: admin/attributes-config.php:193
129
+ #: admin/attributes-config.php:260
130
  msgid "Swatch will appear as Square with slight curvature at border of 3px."
131
  msgstr ""
132
 
133
+ #: admin/attributes-config.php:194
134
+ #: admin/attributes-config.php:261
135
  msgid "Swatch will appear as Circle"
136
  msgstr ""
137
 
138
+ #: admin/attributes-config.php:195
139
+ #: admin/attributes-config.php:262
140
  msgid "Create custom Swatch shape by choosing different height and width"
141
  msgstr ""
142
 
143
+ #: admin/attributes-config.php:200
144
+ #: admin/attributes-config.php:265
145
  msgid "Size (Optional)"
146
  msgstr ""
147
 
148
+ #: admin/attributes-config.php:204
149
  msgid "Control the size of this particular attribute. Default size is 24px"
150
  msgstr ""
151
 
152
+ #: admin/attributes-config.php:209
153
+ #: admin/attributes-config.php:227
154
+ #: admin/attributes-config.php:270
155
  msgid "Height (Optional)"
156
  msgstr ""
157
 
158
+ #: admin/attributes-config.php:213
159
  msgid "Control the height of this particular attribute. Default height is 24px"
160
  msgstr ""
161
 
162
+ #: admin/attributes-config.php:218
163
+ #: admin/attributes-config.php:236
164
+ #: admin/attributes-config.php:275
165
  msgid "Width (Optional)"
166
  msgstr ""
167
 
168
+ #: admin/attributes-config.php:222
169
  msgid "Control the width of this particular attribute. Default width is 24px"
170
  msgstr ""
171
 
172
+ #: admin/attributes-config.php:231
173
  msgid "Control the height of this particular attribute. Default height is 30px"
174
  msgstr ""
175
 
176
+ #: admin/attributes-config.php:240
177
  msgid "Control the width of this particular attribute. Default width is 30px"
178
  msgstr ""
179
 
180
+ #: admin/attributes-config.php:267
181
  msgid "Control the size of this particular attribute. Default size is 24px"
182
  msgstr ""
183
 
184
+ #: admin/attributes-config.php:272
185
  msgid "Control the height of this particular attribute. Default height is 24px"
186
  msgstr ""
187
 
188
+ #: admin/attributes-config.php:277
189
  msgid "Control the width of this particular attribute. Default width is 24px"
190
  msgstr ""
191
 
192
+ #: admin/attributes-config.php:333
193
  msgid "Swatches Settings"
194
  msgstr ""
195
 
196
+ #: admin/attributes-config.php:334
197
  msgid "Choose how this attribute should appear in frontend."
198
  msgstr ""
199
 
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: brainstormforce
3
  Tags: woocommerce variation swatches, woocommerce attributes, woocommerce variation, product attributes, product color, product size, variable product attributes, variation product swatches, color variation swatch, image variation swatch
4
  Requires at least: 5.4
5
  Tested up to: 6.0.2
6
- Stable tag: 1.0.4
7
  Requires PHP: 5.6
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -106,6 +106,11 @@ Yes, this plugin enables variation swatches on shop / archieve page. User can se
106
  2. Multiple options for swatches available
107
 
108
  == Changelog ==
 
 
 
 
 
109
  = 1.0.4 – WEDNESDAY, 7th SEPTEMBER 2022 =
110
  * Improvement - Supports WooCommerce shortcodes.
111
  * Improvement - Astra's swap mode working on disabling swatches on shop page.
3
  Tags: woocommerce variation swatches, woocommerce attributes, woocommerce variation, product attributes, product color, product size, variable product attributes, variation product swatches, color variation swatch, image variation swatch
4
  Requires at least: 5.4
5
  Tested up to: 6.0.2
6
+ Stable tag: 1.0.5
7
  Requires PHP: 5.6
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
106
  2. Multiple options for swatches available
107
 
108
  == Changelog ==
109
+ = 1.0.5 – TUESDAY, 18th OCTOBER 2022 =
110
+ * Fixed - Compatibility issues with WP Sheet Editor – Taxonomy Terms Pro.
111
+ * Fixed - Fatal error with Astra theme.
112
+ * Fixed - Variation price disappears on shop page.
113
+
114
  = 1.0.4 – WEDNESDAY, 7th SEPTEMBER 2022 =
115
  * Improvement - Supports WooCommerce shortcodes.
116
  * Improvement - Astra's swap mode working on disabling swatches on shop page.
variation-swatches-woo.php CHANGED
@@ -4,7 +4,7 @@
4
  * Description: Provides super easy shopping experience by displaying beautiful variation swatches on WooCommerce shop and product page.
5
  * Author: CartFlows
6
  * Author URI: https://cartflows.com/
7
- * Version: 1.0.4
8
  * License: GPL v2
9
  * Text Domain: variation-swatches-woo
10
  *
@@ -22,7 +22,7 @@ define( 'CFVSW_FILE', __FILE__ );
22
  define( 'CFVSW_BASE', plugin_basename( CFVSW_FILE ) );
23
  define( 'CFVSW_DIR', plugin_dir_path( CFVSW_FILE ) );
24
  define( 'CFVSW_URL', plugins_url( '/', CFVSW_FILE ) );
25
- define( 'CFVSW_VER', '1.0.4' );
26
  define( 'CFVSW_GLOBAL', 'cfvsw_global' );
27
  define( 'CFVSW_SHOP', 'cfvsw_shop' );
28
  define( 'CFVSW_STYLE', 'cfvsw_style' );
4
  * Description: Provides super easy shopping experience by displaying beautiful variation swatches on WooCommerce shop and product page.
5
  * Author: CartFlows
6
  * Author URI: https://cartflows.com/
7
+ * Version: 1.0.5
8
  * License: GPL v2
9
  * Text Domain: variation-swatches-woo
10
  *
22
  define( 'CFVSW_BASE', plugin_basename( CFVSW_FILE ) );
23
  define( 'CFVSW_DIR', plugin_dir_path( CFVSW_FILE ) );
24
  define( 'CFVSW_URL', plugins_url( '/', CFVSW_FILE ) );
25
+ define( 'CFVSW_VER', '1.0.5' );
26
  define( 'CFVSW_GLOBAL', 'cfvsw_global' );
27
  define( 'CFVSW_SHOP', 'cfvsw_shop' );
28
  define( 'CFVSW_STYLE', 'cfvsw_style' );