@@ 293-298 (lines=6) @@ | ||
290 | ||
291 | // Billing address |
|
292 | $billing_address = array(); |
|
293 | if ( $this->checkout_fields['billing'] ) { |
|
294 | foreach ( array_keys( $this->checkout_fields['billing'] ) as $field ) { |
|
295 | $field_name = str_replace( 'billing_', '', $field ); |
|
296 | $billing_address[ $field_name ] = $this->get_posted_address_data( $field_name ); |
|
297 | } |
|
298 | } |
|
299 | ||
300 | // Shipping address. |
|
301 | $shipping_address = array(); |
|
@@ 302-307 (lines=6) @@ | ||
299 | ||
300 | // Shipping address. |
|
301 | $shipping_address = array(); |
|
302 | if ( $this->checkout_fields['shipping'] ) { |
|
303 | foreach ( array_keys( $this->checkout_fields['shipping'] ) as $field ) { |
|
304 | $field_name = str_replace( 'shipping_', '', $field ); |
|
305 | $shipping_address[ $field_name ] = $this->get_posted_address_data( $field_name, 'shipping' ); |
|
306 | } |
|
307 | } |
|
308 | ||
309 | $order->set_address( $billing_address, 'billing' ); |
|
310 | $order->set_address( $shipping_address, 'shipping' ); |