includes/abstracts/abstract-wc-legacy-order.php 1 location
|
@@ 230-232 (lines=3) @@
|
| 227 |
|
public function set_address( $address, $type = 'billing' ) { |
| 228 |
|
foreach ( $address as $key => $value ) { |
| 229 |
|
update_post_meta( $this->get_id(), "_{$type}_" . $key, $value ); |
| 230 |
|
if ( is_callable( array( $this, "set_{$type}_{$key}" ) ) ) { |
| 231 |
|
$this->{"set_{$type}_{$key}"}( $value ); |
| 232 |
|
} |
| 233 |
|
} |
| 234 |
|
} |
| 235 |
|
|
includes/class-wc-order-item.php 1 location
|
@@ 68-72 (lines=5) @@
|
| 65 |
|
*/ |
| 66 |
|
public function set_all( $data ) { |
| 67 |
|
foreach ( $data as $key => $value ) { |
| 68 |
|
if ( is_callable( array( $this, "set_$key" ) ) ) { |
| 69 |
|
$this->{"set_$key"}( $value ); |
| 70 |
|
} else { |
| 71 |
|
$this->_data[ $key ] = $value; |
| 72 |
|
} |
| 73 |
|
} |
| 74 |
|
} |
| 75 |
|
|