Produtos de impressão PHP com atributo

$all_ids = get_posts( array(
        'post_type' => 'product',
        'numberposts' => -1,
        'post_status' => 'publish',
        'fields' => 'ids',
		'tax_query' => array(
         array(
            'taxonomy' => 'pa_years', // Hover over "Configure terms" and look for taxonomy=pa_years in the link
            'field' => 'slug',
            'terms' => '2016', // Is the slug under "Configure terms"
            'operator' => 'IN',
         )
      ),
   ) );
   /*foreach ( $all_ids as $id ) {
        echo $id ."<br>";
   }*/
Button