When forcing shipping to billing, set the shipping fields in the order itself

Fixes #14006
This commit is contained in:
Mike Jolley 2017-04-06 09:50:34 +01:00
parent baaaf493d3
commit 8614a7922d
1 changed files with 1 additions and 1 deletions

View File

@ -558,7 +558,7 @@ class WC_Checkout {
}
}
if ( in_array( 'shipping', $skipped ) && WC()->cart->needs_shipping_address() ) {
if ( in_array( 'shipping', $skipped ) && ( WC()->cart->needs_shipping_address() || wc_ship_to_billing_address_only() ) ) {
foreach ( $this->get_checkout_fields( 'shipping' ) as $key => $field ) {
$data[ $key ] = isset( $data[ 'billing_' . substr( $key, 9 ) ] ) ? $data[ 'billing_' . substr( $key, 9 ) ] : '';
}