From 4926a82fca56cc68b9aa0344be1a7d41d6c9089e Mon Sep 17 00:00:00 2001 From: dinamiko Date: Wed, 21 Apr 2021 15:23:56 +0200 Subject: [PATCH] Add check for `dcc_enabled` before `dcc_vault_enabled` on `vault_settings_enabled` method --- modules/ppcp-button/src/Assets/class-smartbutton.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ppcp-button/src/Assets/class-smartbutton.php b/modules/ppcp-button/src/Assets/class-smartbutton.php index d9987bee7..16b2fe244 100644 --- a/modules/ppcp-button/src/Assets/class-smartbutton.php +++ b/modules/ppcp-button/src/Assets/class-smartbutton.php @@ -982,7 +982,7 @@ class SmartButton implements SmartButtonInterface { if ( $this->settings->has( 'vault_enabled' ) && $this->settings->get( 'vault_enabled' ) ) { return true; } - if ( $this->settings->has( 'dcc_vault_enabled' ) && $this->settings->get( 'dcc_vault_enabled' ) ) { + if ( $this->settings->has( 'dcc_enabled' ) && $this->settings->get( 'dcc_enabled' ) && $this->settings->has( 'dcc_vault_enabled' ) && $this->settings->get( 'dcc_vault_enabled' ) ) { return true; } return false;