Created
June 30, 2017 11:20
-
-
Save janisdonis/d1e9b625295852d0f6cde97397dea71c to your computer and use it in GitHub Desktop.
Attribute loop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$terms = get_the_terms( $product->id, 'pa_vizualais-stavoklis'); | |
foreach($terms as $term){ | |
if($term->slug == 'jauns' || $term->slug == 'jauns-bez-kastes' || $term->slug == 'a-plus') { | |
$used = '<used>0</used>'; | |
echo $used; | |
} | |
else { | |
$used = '<used>1</used>'; | |
echo $used; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment