@@ -251,7 +251,7 @@ public function handle_account_registration( $customer_id ) {
251
251
252
252
if ( $ customer_id && ! empty ( $ data ['amazon_link ' ] ) ) {
253
253
$ checkout_session = $ this ->get_checkout_session ();
254
- $ buyer_id = $ checkout_session ->buyer ->buyerId ;
254
+ $ buyer_id = $ checkout_session ->buyer ->buyerId ;
255
255
256
256
$ buyer_user_id = $ this ->get_customer_id_from_buyer ( $ buyer_id );
257
257
if ( ! $ buyer_user_id ) {
@@ -266,9 +266,9 @@ public function handle_account_registration( $customer_id ) {
266
266
// FROM: WC_Checkout->process_customer
267
267
if ( ! is_user_logged_in () && ( $ checkout ->is_registration_required () || ! empty ( $ data ['createaccount ' ] ) ) ) {
268
268
$ checkout_session = $ this ->get_checkout_session ();
269
- $ buyer_id = $ checkout_session ->buyer ->buyerId ;
270
- $ buyer_email = $ checkout_session ->buyer ->email ;
271
- $ buyer_user_id = $ this ->get_customer_id_from_buyer ( $ buyer_id );
269
+ $ buyer_id = $ checkout_session ->buyer ->buyerId ;
270
+ $ buyer_email = $ checkout_session ->buyer ->email ;
271
+ $ buyer_user_id = $ this ->get_customer_id_from_buyer ( $ buyer_id );
272
272
273
273
if ( isset ( $ data ['amazon_validate ' ] ) ) {
274
274
if ( $ buyer_user_id ) {
@@ -300,8 +300,8 @@ public function handle_account_registration( $customer_id ) {
300
300
}
301
301
302
302
if ( ! $ customer_id ) {
303
- $ username = ! empty ( $ data ['account_username ' ] ) ? $ data ['account_username ' ] : '' ;
304
- $ password = ! empty ( $ data ['account_password ' ] ) ? $ data ['account_password ' ] : '' ;
303
+ $ username = ! empty ( $ data ['account_username ' ] ) ? $ data ['account_username ' ] : '' ;
304
+ $ password = ! empty ( $ data ['account_password ' ] ) ? $ data ['account_password ' ] : '' ;
305
305
306
306
$ customer_id = wc_create_new_customer (
307
307
$ data ['billing_email ' ],
@@ -452,8 +452,8 @@ public function maybe_handle_apa_action() {
452
452
453
453
if ( ! is_user_logged_in () ) {
454
454
$ checkout_session = $ this ->get_checkout_session ();
455
- $ buyer_id = $ checkout_session ->buyer ->buyerId ;
456
- $ buyer_email = $ checkout_session ->buyer ->email ;
455
+ $ buyer_id = $ checkout_session ->buyer ->buyerId ;
456
+ $ buyer_email = $ checkout_session ->buyer ->email ;
457
457
458
458
$ buyer_user_id = $ this ->get_customer_id_from_buyer ( $ buyer_id );
459
459
@@ -481,8 +481,8 @@ public function maybe_handle_apa_action() {
481
481
482
482
if ( isset ( $ _GET ['amazon_validate_ownership ' ] ) && $ this ->is_logged_in () ) {
483
483
$ checkout_session = $ this ->get_checkout_session ();
484
- $ buyer_id = $ checkout_session ->buyer ->buyerId ;
485
- $ buyer_email = $ checkout_session ->buyer ->email ;
484
+ $ buyer_id = $ checkout_session ->buyer ->buyerId ;
485
+ $ buyer_email = $ checkout_session ->buyer ->email ;
486
486
487
487
$ buyer_user_id = $ this ->get_customer_id_from_buyer ( $ buyer_id );
488
488
@@ -502,7 +502,7 @@ public function maybe_handle_apa_action() {
502
502
$ code = wp_rand ( 1111 , 9999 );
503
503
update_user_meta ( $ user_id , 'wc_apa_ownership_verification_code ' , $ code );
504
504
505
- $ mailer = WC ()->mailer ();
505
+ $ mailer = WC ()->mailer ();
506
506
507
507
// Buffer.
508
508
ob_start ();
@@ -643,8 +643,8 @@ protected function hijack_checkout_field_account( $checkout ) {
643
643
}
644
644
645
645
$ checkout_session = $ this ->get_checkout_session ();
646
- $ buyer_id = $ checkout_session ->buyer ->buyerId ;
647
- $ buyer_email = $ checkout_session ->buyer ->email ;
646
+ $ buyer_id = $ checkout_session ->buyer ->buyerId ;
647
+ $ buyer_email = $ checkout_session ->buyer ->email ;
648
648
649
649
$ buyer_user_id = $ this ->get_customer_id_from_buyer ( $ buyer_id );
650
650
@@ -673,9 +673,9 @@ protected function hijack_checkout_field_account( $checkout ) {
673
673
);
674
674
675
675
$ checkout_fields ['account ' ]['amazon_validate ' ] = array (
676
- 'type ' => 'text ' ,
677
- 'label ' => __ ( 'Verification Code ' , 'woocommerce-gateway-amazon-payments-advanced ' ),
678
- 'required ' => true ,
676
+ 'type ' => 'text ' ,
677
+ 'label ' => __ ( 'Verification Code ' , 'woocommerce-gateway-amazon-payments-advanced ' ),
678
+ 'required ' => true ,
679
679
);
680
680
681
681
$ checkout ->checkout_fields = $ checkout_fields ;
@@ -776,8 +776,8 @@ public function display_amazon_customer_info() {
776
776
<?php if ( is_user_logged_in () ) : ?>
777
777
<?php
778
778
$ checkout_session = $ this ->get_checkout_session ();
779
- $ buyer_id = $ checkout_session ->buyer ->buyerId ;
780
- $ buyer_email = $ checkout_session ->buyer ->email ;
779
+ $ buyer_id = $ checkout_session ->buyer ->buyerId ;
780
+ $ buyer_email = $ checkout_session ->buyer ->email ;
781
781
782
782
$ buyer_user_id = $ this ->get_customer_id_from_buyer ( $ buyer_id );
783
783
?>
@@ -789,8 +789,8 @@ public function display_amazon_customer_info() {
789
789
woocommerce_form_field (
790
790
$ key ,
791
791
array (
792
- 'type ' => 'checkbox ' ,
793
- 'label ' => __ ( 'Link Amazon Pay Account ' , 'woocommerce-gateway-amazon-payments-advanced ' ),
792
+ 'type ' => 'checkbox ' ,
793
+ 'label ' => __ ( 'Link Amazon Pay Account ' , 'woocommerce-gateway-amazon-payments-advanced ' ),
794
794
),
795
795
$ checkout ->get_value ( $ key )
796
796
);
0 commit comments