From 4e4fc3807766113fa2052bff9344c7fc5bccec10 Mon Sep 17 00:00:00 2001 From: dinamiko Date: Mon, 15 Nov 2021 09:53:50 +0100 Subject: [PATCH] Improve conditional format --- modules/ppcp-api-client/src/Endpoint/IdentityToken.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/ppcp-api-client/src/Endpoint/IdentityToken.php b/modules/ppcp-api-client/src/Endpoint/IdentityToken.php index a36aa9029..2e73b1af9 100644 --- a/modules/ppcp-api-client/src/Endpoint/IdentityToken.php +++ b/modules/ppcp-api-client/src/Endpoint/IdentityToken.php @@ -94,9 +94,11 @@ class IdentityToken { 'Content-Type' => 'application/json', ), ); - if ( $customer_id + if ( + $customer_id && ( $this->settings->has( 'vault_enabled' ) && $this->settings->get( 'vault_enabled' ) ) - && defined( 'PPCP_FLAG_SUBSCRIPTION' ) && PPCP_FLAG_SUBSCRIPTION ) { + && defined( 'PPCP_FLAG_SUBSCRIPTION' ) && PPCP_FLAG_SUBSCRIPTION + ) { $args['body'] = wp_json_encode( array( 'customer_id' => $this->prefix . $customer_id ) ); }