Improve comments

This commit is contained in:
Emili Castells Guasch 2025-08-12 15:12:34 +02:00
parent efb5c4afd3
commit 4c59a81e22
No known key found for this signature in database
2 changed files with 1 additions and 9 deletions

View file

@ -340,6 +340,7 @@ class SavePaymentMethodsModule implements ServiceModule, ExtendingModule, Execut
}
);
// Do not display PayPal button if the user already has a PayPal payment token.
add_action(
'woocommerce_add_payment_method_form_bottom',
function () use ( $c ) {
@ -347,7 +348,6 @@ class SavePaymentMethodsModule implements ServiceModule, ExtendingModule, Execut
return;
}
// Do not display PayPal button if the user already has a PayPal payment token.
$payment_method_tokens_checked = $c->get( 'save-payment-methods.service.payment-method-tokens-checker' );
assert( $payment_method_tokens_checked instanceof PaymentMethodTokensChecker );
$customer_id = get_user_meta( get_current_user_id(), '_ppcp_target_customer_id', true );

View file

@ -11,9 +11,6 @@ namespace WooCommerce\PayPalCommerce\SavePaymentMethods\Service;
use WooCommerce\PayPalCommerce\ApiClient\Endpoint\PaymentTokensEndpoint;
/**
* Class PaymentMethodTokensChecker.
*/
class PaymentMethodTokensChecker {
/**
@ -23,11 +20,6 @@ class PaymentMethodTokensChecker {
*/
private PaymentTokensEndpoint $payment_method_tokens_endpoint;
/**
* PaymentMethodTokensChecker constructor.
*
* @param PaymentTokensEndpoint $payment_method_tokens_endpoint Payment method tokens endpoint.
*/
public function __construct( PaymentTokensEndpoint $payment_method_tokens_endpoint ) {
$this->payment_method_tokens_endpoint = $payment_method_tokens_endpoint;
}