• I need to get all the images thumb from all the variation applied to a certain product.

    I tried: that but it dosen’t works…

    $terms = get_terms( array( 'taxonomy' => 'pa_tessuto' ) );
    foreach ( $terms as $term ) {
      var_dump( $term );
    }

    because it shows me the obj below but it don’t show me the thumbnail url

    object(WP_Term)#17935 (10) { ["term_id"]=> int(40) ["name"]=> string(15) "nome tessuto 01" ["slug"]=> string(15) "nome-tessuto-01" ["term_group"]=> int(0) ["term_taxonomy_id"]=> int(40) ["taxonomy"]=> string(10) "pa_tessuto" ["description"]=> string(109) "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras finibus nulla sit amet dui commodo ullamcorper." ["parent"]=> int(0) ["count"]=> int(1) ["filter"]=> string(3) "raw" }

    How can i do?

Viewing 1 replies (of 1 total)
  • Plugin Author Woosuite

    (@themealien)

    Hello,

    You can try this code:

    $attr  = TA_WCVS()->get_tax_attribute( 'pa_tessuto' )
    $terms = get_terms( array( 'taxonomy' => 'pa_tessuto' ) );
    
    foreach ( $terms as $term ) {
    	$swatch = get_term_meta( $term->term_id, $attr->attribute_type, true );
    }

    Thank you

Viewing 1 replies (of 1 total)
  • The topic ‘Get image thumb s list from an attribute taxonomy’ is closed to new replies.