| @@ 845-857 (lines=13) @@ | ||
| 842 | * @param int $id (default: 0). |
|
| 843 | * @return bool |
|
| 844 | */ |
|
| 845 | public function get_order( $id = 0 ) { |
|
| 846 | ||
| 847 | if ( ! $id ) { |
|
| 848 | return false; |
|
| 849 | } |
|
| 850 | ||
| 851 | if ( $result = get_post( $id ) ) { |
|
| 852 | $this->populate( $result ); |
|
| 853 | return true; |
|
| 854 | } |
|
| 855 | ||
| 856 | return false; |
|
| 857 | } |
|
| 858 | ||
| 859 | /** |
|
| 860 | * Populates an order from the loaded post data. |
|
| @@ 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. |
|