mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Use guest customer id when loading script if it exist
This commit is contained in:
parent
2108b35a21
commit
5786ae6bbd
1 changed files with 5 additions and 0 deletions
|
@ -103,6 +103,11 @@ class IdentityToken {
|
|||
WC()->session->set( 'ppcp_guest_customer_id', $customer_id );
|
||||
}
|
||||
|
||||
$guest_customer_id = get_user_meta( $customer_id, 'ppcp_guest_customer_id', true );
|
||||
if ( $guest_customer_id ) {
|
||||
$customer_id = $guest_customer_id;
|
||||
}
|
||||
|
||||
$args['body'] = wp_json_encode( array( 'customer_id' => $this->prefix . (string) $customer_id ) );
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue