| @@ 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. |
|
| @@ 938-950 (lines=13) @@ | ||
| 935 | * @param int $id (default: 0). |
|
| 936 | * @return bool |
|
| 937 | */ |
|
| 938 | public function get_order( $id = 0 ) { |
|
| 939 | ||
| 940 | if ( ! $id ) { |
|
| 941 | return false; |
|
| 942 | } |
|
| 943 | ||
| 944 | if ( $result = get_post( $id ) ) { |
|
| 945 | $this->populate( $result ); |
|
| 946 | return true; |
|
| 947 | } |
|
| 948 | ||
| 949 | return false; |
|
| 950 | } |
|
| 951 | ||
| 952 | /** |
|
| 953 | * Populates an order from the loaded post data. |
|