Improve conditional format

This commit is contained in:
dinamiko 2021-11-15 09:53:50 +01:00
parent 7e575eef5d
commit 4e4fc38077

View file

@ -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 ) );
}