* Revert "Add phone number to my account shipping address. (#47062)"
This reverts commit 4840af874a
.
* Add changefile(s) from automation for the following project(s): woocommerce
---------
Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
parent
d2bde1368a
commit
b4efa72b07
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: tweak
|
||||||
|
Comment: This reverts an existing PR.
|
||||||
|
|
|
@ -1694,15 +1694,12 @@ class WC_Countries {
|
||||||
$address_fields[ $type . $key ] = $value;
|
$address_fields[ $type . $key ] = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add fields to address forms.
|
// Add email and phone fields.
|
||||||
if ( in_array( $type, array( 'billing_', 'shipping_' ), true ) ) {
|
if ( 'billing_' === $type ) {
|
||||||
// Add phone to billing/shipping address form.
|
if ( 'hidden' !== get_option( 'woocommerce_checkout_phone_field', 'required' ) ) {
|
||||||
$show_phone_field = get_option( 'woocommerce_checkout_phone_field', 'required' );
|
$address_fields['billing_phone'] = array(
|
||||||
|
|
||||||
if ( 'hidden' !== $show_phone_field ) {
|
|
||||||
$address_fields[ $type . 'phone' ] = array(
|
|
||||||
'label' => __( 'Phone', 'woocommerce' ),
|
'label' => __( 'Phone', 'woocommerce' ),
|
||||||
'required' => 'required' === $show_phone_field,
|
'required' => 'required' === get_option( 'woocommerce_checkout_phone_field', 'required' ),
|
||||||
'type' => 'tel',
|
'type' => 'tel',
|
||||||
'class' => array( 'form-row-wide' ),
|
'class' => array( 'form-row-wide' ),
|
||||||
'validate' => array( 'phone' ),
|
'validate' => array( 'phone' ),
|
||||||
|
@ -1710,19 +1707,15 @@ class WC_Countries {
|
||||||
'priority' => 100,
|
'priority' => 100,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
$address_fields['billing_email'] = array(
|
||||||
// Add email to billing address form.
|
'label' => __( 'Email address', 'woocommerce' ),
|
||||||
if ( 'billing_' === $type ) {
|
'required' => true,
|
||||||
$address_fields['billing_email'] = array(
|
'type' => 'email',
|
||||||
'label' => __( 'Email address', 'woocommerce' ),
|
'class' => array( 'form-row-wide' ),
|
||||||
'required' => true,
|
'validate' => array( 'email' ),
|
||||||
'type' => 'email',
|
'autocomplete' => 'no' === get_option( 'woocommerce_registration_generate_username' ) ? 'email' : 'email username',
|
||||||
'class' => array( 'form-row-wide' ),
|
'priority' => 110,
|
||||||
'validate' => array( 'email' ),
|
);
|
||||||
'autocomplete' => 'no' === get_option( 'woocommerce_registration_generate_username' ) ? 'email' : 'email username',
|
|
||||||
'priority' => 110,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -960,7 +960,7 @@ test.describe.serial( 'Tax rates in the cart and checkout', () => {
|
||||||
.getByRole( 'textbox', { name: 'ZIP Code *' } )
|
.getByRole( 'textbox', { name: 'ZIP Code *' } )
|
||||||
.type( customer.billing.us.zip );
|
.type( customer.billing.us.zip );
|
||||||
await page
|
await page
|
||||||
.getByRole( 'textbox', { name: 'Phone *' } )
|
.getByLabel( 'Phone *' )
|
||||||
.fill( customer.billing.us.phone );
|
.fill( customer.billing.us.phone );
|
||||||
await page
|
await page
|
||||||
.getByLabel( 'Email address *' )
|
.getByLabel( 'Email address *' )
|
||||||
|
|
|
@ -333,9 +333,7 @@ test.describe( 'Checkout page', () => {
|
||||||
await page
|
await page
|
||||||
.getByRole( 'textbox', { name: 'ZIP Code *' } )
|
.getByRole( 'textbox', { name: 'ZIP Code *' } )
|
||||||
.fill( '97403' );
|
.fill( '97403' );
|
||||||
await page
|
await page.getByLabel( 'Phone *' ).fill( '555 555-5555' );
|
||||||
.getByRole( 'textbox', { name: 'Phone *' } )
|
|
||||||
.fill( '555 555-5555' );
|
|
||||||
await page.getByLabel( 'Email address *' ).fill( guestEmail );
|
await page.getByLabel( 'Email address *' ).fill( guestEmail );
|
||||||
|
|
||||||
await page.getByText( 'Cash on delivery' ).click();
|
await page.getByText( 'Cash on delivery' ).click();
|
||||||
|
|
|
@ -108,7 +108,6 @@ test.describe( 'Customer can manage addresses in My Account > Addresses page', (
|
||||||
await page.locator( '#shipping_country' ).selectOption( 'US' );
|
await page.locator( '#shipping_country' ).selectOption( 'US' );
|
||||||
await page.locator( '#shipping_state' ).selectOption( 'NY' );
|
await page.locator( '#shipping_state' ).selectOption( 'NY' );
|
||||||
await page.locator( '#shipping_postcode' ).fill( '10010' );
|
await page.locator( '#shipping_postcode' ).fill( '10010' );
|
||||||
await page.locator( '#shipping_phone' ).fill( '555 555-5555' );
|
|
||||||
await page.locator( 'text=Save address' ).click();
|
await page.locator( 'text=Save address' ).click();
|
||||||
|
|
||||||
// verify shipping address has been applied
|
// verify shipping address has been applied
|
||||||
|
|
Loading…
Reference in New Issue