Add user needs to be logged in message when subscription in the cart

This commit is contained in:
dinamiko 2021-10-28 12:43:02 +02:00
parent 3c237b6315
commit 990c9f946e
2 changed files with 17 additions and 11 deletions

21
composer.lock generated
View file

@ -735,16 +735,16 @@
},
{
"name": "composer/semver",
"version": "3.2.5",
"version": "3.2.6",
"source": {
"type": "git",
"url": "https://github.com/composer/semver.git",
"reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9"
"reference": "83e511e247de329283478496f7a1e114c9517506"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/semver/zipball/31f3ea725711245195f62e54ffa402d8ef2fdba9",
"reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9",
"url": "https://api.github.com/repos/composer/semver/zipball/83e511e247de329283478496f7a1e114c9517506",
"reference": "83e511e247de329283478496f7a1e114c9517506",
"shasum": ""
},
"require": {
@ -807,7 +807,7 @@
"type": "tidelift"
}
],
"time": "2021-05-24T12:41:47+00:00"
"time": "2021-10-25T11:34:17+00:00"
},
{
"name": "composer/xdebug-handler",
@ -2921,7 +2921,6 @@
"type": "github"
}
],
"abandoned": true,
"time": "2020-11-30T07:30:19+00:00"
},
{
@ -3532,16 +3531,16 @@
},
{
"name": "vimeo/psalm",
"version": "4.11.1",
"version": "4.11.2",
"source": {
"type": "git",
"url": "https://github.com/vimeo/psalm.git",
"reference": "e33492398bd4e5e2ab60e331d445979bd83feecd"
"reference": "6fba5eb554f9507b72932f9c75533d8af593688d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/vimeo/psalm/zipball/e33492398bd4e5e2ab60e331d445979bd83feecd",
"reference": "e33492398bd4e5e2ab60e331d445979bd83feecd",
"url": "https://api.github.com/repos/vimeo/psalm/zipball/6fba5eb554f9507b72932f9c75533d8af593688d",
"reference": "6fba5eb554f9507b72932f9c75533d8af593688d",
"shasum": ""
},
"require": {
@ -3629,7 +3628,7 @@
"inspection",
"php"
],
"time": "2021-10-24T12:29:22+00:00"
"time": "2021-10-26T17:28:17+00:00"
},
{
"name": "webmozart/assert",

View file

@ -111,6 +111,13 @@ class DisableGateways {
}
if ( $this->subscription_helper->cart_contains_subscription() && ! is_user_logged_in() ) {
add_filter(
'woocommerce_no_available_payment_methods_message',
function( $message ) {
return $message . '<br><br>' . esc_html__( 'PayPal payments needs you logged in to save the payment.', 'woocommerce-paypal-payments' );
}
);
return true;
}