Merge pull request #2058 from woocommerce/PCP-2169-must-pass-create-subscription-with-intent-subscription-error-with-pay-pal-subscriptions-mode-when-allowing-manual-renewal-payments

"Must pass createSubscription with intent=subscription" error with PayPal Subscriptions mode (2169)
This commit is contained in:
Emili Castells 2024-02-29 11:55:14 +01:00 committed by GitHub
commit fe540a5a50
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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