@@ 56-65 (lines=10) @@ | ||
53 | * Insert data into the database. |
|
54 | * @since 2.7.0 |
|
55 | */ |
|
56 | public function create() { |
|
57 | parent::create(); |
|
58 | ||
59 | // Store additonal order data |
|
60 | if ( $this->get_id() ) { |
|
61 | $this->update_post_meta( '_refund_amount', $this->get_amount() ); |
|
62 | $this->update_post_meta( '_refunded_by', $this->get_refunded_by() ); |
|
63 | $this->update_post_meta( '_refund_reason', $this->get_reason() ); |
|
64 | } |
|
65 | } |
|
66 | ||
67 | /** |
|
68 | * Read from the database. |
|
@@ 92-99 (lines=8) @@ | ||
89 | * Update data in the database. |
|
90 | * @since 2.7.0 |
|
91 | */ |
|
92 | public function update() { |
|
93 | parent::update(); |
|
94 | ||
95 | // Store additonal order data |
|
96 | $this->update_post_meta( '_refund_amount', $this->get_amount() ); |
|
97 | $this->update_post_meta( '_refunded_by', $this->get_refunded_by() ); |
|
98 | $this->update_post_meta( '_refund_reason', $this->get_reason() ); |
|
99 | } |
|
100 | ||
101 | /** |
|
102 | * Delete data from the database. |