@@ -322,10 +322,7 @@ protected function is_logged_in() {
322
322
}
323
323
324
324
public function hijack_checkout_fields ( $ checkout ) {
325
- $ has_billing_fields = ( isset ( $ checkout ->checkout_fields ['billing ' ] ) && is_array ( $ checkout ->checkout_fields ['billing ' ] ) );
326
- if ( $ has_billing_fields ) {
327
- $ this ->hijack_checkout_field_account ( $ checkout );
328
- }
325
+ $ this ->hijack_checkout_field_account ( $ checkout );
329
326
330
327
// During an Amazon checkout, the standard billing and shipping fields need to be
331
328
// "removed" so that we don't trigger a false negative on form validation -
@@ -412,14 +409,6 @@ public function hijack_checkout_fields( $checkout ) {
412
409
* @param WC_Checkout $checkout WC_Checkout instance.
413
410
*/
414
411
protected function hijack_checkout_field_account ( $ checkout ) {
415
- $ billing_fields_to_copy = array (
416
- 'billing_first_name ' => '' ,
417
- 'billing_last_name ' => '' ,
418
- 'billing_email ' => '' ,
419
- );
420
-
421
- $ billing_fields_to_merge = array_intersect_key ( $ checkout ->checkout_fields ['billing ' ], $ billing_fields_to_copy );
422
-
423
412
/**
424
413
* WC 3.0 changes a bit a way to retrieve fields.
425
414
*
@@ -441,12 +430,6 @@ protected function hijack_checkout_field_account( $checkout ) {
441
430
? $ checkout_fields ['account ' ]
442
431
: array ();
443
432
444
- $ checkout_fields ['account ' ] = array_merge ( $ billing_fields_to_merge , $ checkout_fields ['account ' ] );
445
-
446
- if ( isset ( $ checkout_fields ['account ' ]['billing_email ' ]['class ' ] ) ) {
447
- $ checkout_fields ['account ' ]['billing_email ' ]['class ' ] = array ();
448
- }
449
-
450
433
$ checkout ->checkout_fields = $ checkout_fields ;
451
434
}
452
435
0 commit comments