Merge pull request #14009 from woocommerce/fix/14006

When forcing shipping to billing, set the shipping fields in the order itself
This commit is contained in:
Claudio Sanches 2017-04-06 10:17:54 -03:00 committed by GitHub
commit 03004bdd49
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 ) ] : '';
}