Skip to content
This repository was archived by the owner on Mar 17, 2022. It is now read-only.

Commit 3db2c10

Browse files
fixed empty attribute for variations
fix for #369 and #359 possible fix for #370
1 parent 29f4895 commit 3db2c10

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
.php_cs.cache
44
*.gif
55
*.gif
6+
.idea

src/Hyyan/WPI/Product/Variation.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ protected function copyVariationMetas($from, $to)
267267
$translated = array();
268268
$tax = str_replace('attribute_', '', $key);
269269
foreach ($metas_from[$key] as $termSlug) {
270-
if (pll_is_translated_taxonomy($tax)) {
270+
if (pll_is_translated_taxonomy($tax) && !empty($termSlug)) {
271271
$term = $this->getTermBySlug($tax, $termSlug);
272272
if ($term) {
273273
$term_id = $term->term_id;

0 commit comments

Comments
 (0)