Refactor manual renewal check

This commit is contained in:
Alex P 2024-10-21 09:45:09 +03:00
parent 53af77897f
commit 2dc42cf072
No known key found for this signature in database
GPG key ID: 54487A734A204D71
3 changed files with 46 additions and 10 deletions

View file

@ -1031,8 +1031,11 @@ document.querySelector("#payment").before(document.querySelector(".ppcp-messages
* @return bool
*/
private function has_subscriptions(): bool {
if ( ! $this->subscription_helper->plugin_is_active() ) {
return false;
}
if (
! $this->subscription_helper->accept_only_automatic_payment_gateways()
$this->subscription_helper->accept_manual_renewals()
&& $this->paypal_subscriptions_enabled() !== true
) {
return false;