adjustments ) { $this->adjustments = edd_get_order_adjustments( array( 'object_id' => $this->id, 'object_type' => 'order_item', 'no_found_rows' => true, 'order' => 'ASC', ) ); } return parent::__get( $key ); } /** * Retrieve fees applied to this order item. * * @since 3.0 * * @return array $fees Fees applied to this item. */ public function get_fees() { return edd_get_order_adjustments( array( 'object_id' => $this->id, 'object_type' => 'order_item', 'type' => 'fee', 'order' => 'ASC', ) ); } /** * Get an order item name, including any price ID name appended to the end. * * @since 3.0 * * @return string The product name including any price ID name. */ public function get_order_item_name() { if ( is_admin() && ( function_exists( 'edd_doing_ajax' ) && ! edd_doing_ajax() ) ) { /** * Allow the product name to be filtered within the admin. * @since 3.0 * @param string $product_name The order item name. * @param EDD\Orders\Order_Item The order item object. */ return apply_filters( 'edd_order_details_item_name', $this->product_name, $this ); } return $this->product_name; } /** * Retrieves order item records that were refunded from this original order item. * * @since 3.0 * * @return Order_Item[]|false */ public function get_refunded_items() { if ( null !== $this->refunded_items ) { return $this->refunded_items; } return edd_get_order_items( array( 'parent' => $this->id ) ); } /** * Checks the order item status to determine whether assets can be delivered. * * @since 3.0 * @return bool */ public function is_deliverable() { return in_array( $this->status, edd_get_deliverable_order_item_statuses(), true ); } }