mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Do not localize id token for guest users
This commit is contained in:
parent
ed3a48e520
commit
3f1f59090c
1 changed files with 4 additions and 0 deletions
|
@ -84,6 +84,10 @@ class SavePaymentMethodsModule implements ModuleInterface {
|
|||
add_filter(
|
||||
'woocommerce_paypal_payments_localized_script_data',
|
||||
function( array $localized_script_data ) use ( $c ) {
|
||||
if ( ! is_user_logged_in() ) {
|
||||
return $localized_script_data;
|
||||
}
|
||||
|
||||
$api = $c->get( 'api.user-id-token' );
|
||||
assert( $api instanceof UserIdToken );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue