includes/wpinv-invoice-functions.php 1 location
|
@@ 1826-1832 (lines=7) @@
|
| 1823 |
|
// Get results. |
| 1824 |
|
$invoices = new WP_Query( $wp_query_args ); |
| 1825 |
|
|
| 1826 |
|
if ( 'objects' === $args['return'] ) { |
| 1827 |
|
$return = array_map( 'wpinv_get_invoice', $invoices->posts ); |
| 1828 |
|
} elseif ( 'self' === $args['return'] ) { |
| 1829 |
|
return $invoices; |
| 1830 |
|
} else { |
| 1831 |
|
$return = $invoices->posts; |
| 1832 |
|
} |
| 1833 |
|
|
| 1834 |
|
if ( $args['paginate' ] ) { |
| 1835 |
|
return (object) array( |
includes/wpinv-item-functions.php 1 location
|
@@ 155-161 (lines=7) @@
|
| 152 |
|
// Get results. |
| 153 |
|
$items = new WP_Query( $wp_query_args ); |
| 154 |
|
|
| 155 |
|
if ( 'objects' === $args['return'] ) { |
| 156 |
|
$return = array_map( 'wpinv_get_item_by_id', $items->posts ); |
| 157 |
|
} elseif ( 'self' === $args['return'] ) { |
| 158 |
|
return $items; |
| 159 |
|
} else { |
| 160 |
|
$return = $items->posts; |
| 161 |
|
} |
| 162 |
|
|
| 163 |
|
if ( $args['paginate' ] ) { |
| 164 |
|
return (object) array( |