Check and removing GooglePay TODOs

This commit is contained in:
Pedro Silva 2023-09-11 10:11:40 +01:00
parent b703f17bbf
commit 1a93df9f50
No known key found for this signature in database
GPG key ID: E2EE20C0669D24B3
3 changed files with 4 additions and 9 deletions

View file

@ -105,8 +105,8 @@ class BlocksPaymentMethod extends AbstractPaymentMethodType {
return array(
'id' => $this->name,
'title' => $paypal_data['title'], // TODO : see if we should use another.
'description' => $paypal_data['description'], // TODO : see if we should use another.
'title' => $paypal_data['title'], // See if we should use another.
'description' => $paypal_data['description'], // See if we should use another.
'enabled' => $paypal_data['enabled'], // This button is enabled when PayPal buttons are.
'scriptData' => $this->button->script_data(),
);

View file

@ -149,7 +149,6 @@ class Button implements ButtonInterface {
$checked = '';
}
// TODO : the input has no name, is it doing anything?
return $options
. '<li><label><input type="checkbox" id="ppcp-onboarding-google" ' . $checked . '> '
. __( 'Onboard with GooglePay', 'woocommerce-paypal-payments' )
@ -175,7 +174,7 @@ class Button implements ButtonInterface {
if ( ! in_array( 'PAYMENT_METHODS', $data['products'], true ) ) {
if ( in_array( 'PPCP', $data['products'], true ) ) {
$data['products'][] = 'PAYMENT_METHODS';
} elseif ( in_array( 'EXPRESS_CHECKOUT', $data['products'], true ) ) { // TODO A bit sketchy, maybe replace on the EXPRESS_CHECKOUT index.
} elseif ( in_array( 'EXPRESS_CHECKOUT', $data['products'], true ) ) { // A bit sketchy, maybe replace on the EXPRESS_CHECKOUT index.
$data['products'][0] = 'PAYMENT_METHODS';
}
}
@ -268,10 +267,6 @@ class Button implements ButtonInterface {
add_action(
$render_placeholder,
function () {
if ( ! is_cart() /* TODO : check other conditions */ ) {
return;
}
$this->googlepay_button();
},
21