/**
  * Gets all the real items purchased which are children of this item
  * @uses  EEH_Line_Item::get_descendants_of_type()
  * @param \EE_Line_Item $parent_line_item - the line item to find descendants of
  * @return EE_Line_Item[]
  */
 public static function get_line_item_descendants(EE_Line_Item $parent_line_item)
 {
     return EEH_Line_Item::get_descendants_of_type($parent_line_item, EEM_Line_Item::type_line_item);
 }
 /**
  * @group current
  * @group 4710
  */
 function test_set_line_items_taxable()
 {
     $t = $this->new_typical_transaction(array('taxable_tickets' => 0));
     EEH_Line_Item::add_unrelated_item($t->total_line_item(), 'Excempt Line Item', 1, 'Description', 1, false, 'exemptme');
     $reg_line_items = EEH_Line_Item::get_descendants_of_type($t->total_line_item(), EEM_Line_Item::type_line_item);
     foreach ($reg_line_items as $line_item) {
         $this->assertFalse($line_item->is_taxable(), print_r($line_item->model_field_array(), true));
     }
     EEH_Line_Item::set_line_items_taxable($t->total_line_item(), true, 'exemptme');
     foreach ($reg_line_items as $line_item) {
         if ($line_item->code() == 'exemptme') {
             $this->assertFalse($line_item->is_taxable(), print_r($line_item->model_field_array(), true));
         } else {
             $this->assertTrue($line_item->is_taxable(), print_r($line_item->model_field_array(), true));
         }
     }
 }
 /**
  * @deprecated
  * @param string $type one of the constants on EEM_Line_Item
  * @return EE_Line_Item[]
  */
 protected function _get_descendants_of_type($type)
 {
     EE_Error::doing_it_wrong('EE_Line_Item::_get_descendants_of_type()', __('Method replaced with EEH_Line_Item::get_descendants_of_type()', 'event_espresso'), '4.6.0');
     EE_Registry::instance()->load_helper('Line_Item');
     return EEH_Line_Item::get_descendants_of_type($this, $type);
 }