| @@ 56-68 (lines=13) @@ | ||
| 53 | * @param int $id |
|
| 54 | * @return bool |
|
| 55 | */ |
|
| 56 | public function get_refund( $id = 0 ) { |
|
| 57 | if ( ! $id ) { |
|
| 58 | return false; |
|
| 59 | } |
|
| 60 | ||
| 61 | if ( $result = get_post( $id ) ) { |
|
| 62 | $this->populate( $result ); |
|
| 63 | ||
| 64 | return true; |
|
| 65 | } |
|
| 66 | ||
| 67 | return false; |
|
| 68 | } |
|
| 69 | ||
| 70 | /** |
|
| 71 | * Populates an refund from the loaded post data. |
|
| @@ 851-863 (lines=13) @@ | ||
| 848 | * @param int $id (default: 0). |
|
| 849 | * @return bool |
|
| 850 | */ |
|
| 851 | public function get_order( $id = 0 ) { |
|
| 852 | ||
| 853 | if ( ! $id ) { |
|
| 854 | return false; |
|
| 855 | } |
|
| 856 | ||
| 857 | if ( $result = get_post( $id ) ) { |
|
| 858 | $this->populate( $result ); |
|
| 859 | return true; |
|
| 860 | } |
|
| 861 | ||
| 862 | return false; |
|
| 863 | } |
|
| 864 | ||
| 865 | /** |
|
| 866 | * Populates an order from the loaded post data. |
|