@@ 917-929 (lines=13) @@ | ||
914 | * @param int $id (default: 0). |
|
915 | * @return bool |
|
916 | */ |
|
917 | public function get_order( $id = 0 ) { |
|
918 | ||
919 | if ( ! $id ) { |
|
920 | return false; |
|
921 | } |
|
922 | ||
923 | if ( $result = get_post( $id ) ) { |
|
924 | $this->populate( $result ); |
|
925 | return true; |
|
926 | } |
|
927 | ||
928 | return false; |
|
929 | } |
|
930 | ||
931 | /** |
|
932 | * 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. |