mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
Improve comments
This commit is contained in:
parent
efb5c4afd3
commit
4c59a81e22
2 changed files with 1 additions and 9 deletions
|
@ -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 );
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue