diff --git a/modules/ppcp-button/src/Assets/SmartButton.php b/modules/ppcp-button/src/Assets/SmartButton.php index d851ca62f..c116796b9 100644 --- a/modules/ppcp-button/src/Assets/SmartButton.php +++ b/modules/ppcp-button/src/Assets/SmartButton.php @@ -1322,7 +1322,7 @@ document.querySelector("#payment").before(document.querySelector(".ppcp-messages 'needShipping' => $this->need_shipping(), 'vaultingEnabled' => $this->settings->has( 'vault_enabled' ) && $this->settings->get( 'vault_enabled' ), 'productType' => null, - 'manualRenewalEnabled' => false, + 'manualRenewalEnabled' => $this->subscription_helper->accept_manual_renewals(), ); if ( is_product() ) { @@ -1332,15 +1332,6 @@ document.querySelector("#payment").before(document.querySelector(".ppcp-messages } } - if ( class_exists( '\WCS_Manual_Renewal_Manager' ) ) { - /** - * We verify the existence of the class prior to invoking a static method. - * - * @psalm-suppress UndefinedClass - */ - $localize['manualRenewalEnabled'] = \WCS_Manual_Renewal_Manager::is_manual_renewal_enabled(); - } - if ( 'pay-now' === $this->context() ) { $localize['pay_now'] = $this->pay_now_script_data(); }