Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Pay and Apple Pay showing up on zero balance owed carts #5406

Closed
themindfactory opened this issue Jan 15, 2023 · 7 comments · Fixed by #6334
Closed

Google Pay and Apple Pay showing up on zero balance owed carts #5406

themindfactory opened this issue Jan 15, 2023 · 7 comments · Fixed by #6334
Assignees
Labels
category: core WC Payments core related issues, where it’s obvious. component: payment request button Apple Pay, Google Pay, etc priority: low The issue/PR is low priority—not many people are affected or there’s a workaround, etc. type: bug The issue is a confirmed bug.

Comments

@themindfactory
Copy link

themindfactory commented Jan 15, 2023

When a user checkouts and the total is ZERO... (free) the Google Pay and Apple Pay still shows up and this is confusing people...

Just add a zero valued item to the cart and checkout on a cellphone.

I have searched high and low for solution but none, I have tried mamy attempts at various methods in PHP and Javascript/CSS to no avail, using the display:none trick on all HTML and CSS involved with the button yields nothing,

Found this but when used on a hook the hooks the beginning of the checkout forms creation just causes errors:

function remove_stripe_payment() {
    remove_action( 'woocommerce_proceed_to_checkout', array( WC_Stripe_Payment_Request::instance(), 'display_payment_request_button_html' ), 1 );
    remove_action( 'woocommerce_proceed_to_checkout', array( WC_Stripe_Payment_Request::instance(), 'display_payment_request_button_separator_html' ), 2 );
}

add_action( 'woocommerce_before_checkout_form', 'remove_stripe');
function remove_stripe() {
if(WC()->cart->total === 0) {
    remove_stripe_payment();
}
}

I have found ways of turning off the feature completely in code (PHP) but not for carts == 0.00

Thoughts?

@themindfactory themindfactory added the type: bug The issue is a confirmed bug. label Jan 15, 2023
@themindfactory
Copy link
Author

themindfactory commented Jan 15, 2023

also tried

add_filter('woocommerce_available_payment_gateways', 'conditional_payment_gateways', 10, 1);
function conditional_payment_gateways( $available_gateways ) {
unset($available_gateways['woocommerce_payments']); 
    return $available_gateways;
}

still shows

@csmcneill csmcneill added the component: payment request button Apple Pay, Google Pay, etc label Jan 16, 2023
@csmcneill
Copy link
Contributor

I suggested creating an issue for this after some discussion here.

As I noted here, this isn't just confined to WCPay—it also affects Stripe and Square.

@zmaglica zmaglica added the category: core WC Payments core related issues, where it’s obvious. label Jan 26, 2023
@zmaglica
Copy link
Contributor

Hi @anu-rock. Is this issue something that team Fusion is planning to work on? The reason why I am asking is that I have to prioritize and I am not sure if you are going to handle it.

@anu-rock
Copy link
Contributor

Thanks for the ping, @zmaglica. We haven't yet planned to pick it up as the team is busy with other work. What priority do you have in mind for this issue?

@anu-rock
Copy link
Contributor

I've added it to our team backlog for now. But we may not be able to visit this until a few weeks later.

@pierorocca
Copy link
Contributor

When a user checkouts and the total is ZERO... (free) the Google Pay and Apple Pay still shows up and this is confusing people...

Could you elaborate on the context and use case? Shipping free samples would be a case where my info contained in Google Pay would be preferable to filling out the checkout form.

@csmcneill
Copy link
Contributor

Could you elaborate on the context and use case?

As @themindfactory noted, there is a confusion element associated with allowing an EPM to be used for a 0.00 cart or product.

When paying via Google Pay or Apple Pay, the card information is still included in the modal, even though that card is not being charged. This could confuse customers, as they would not be prompted to provide their card information if they were going through the normal checkout flow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: core WC Payments core related issues, where it’s obvious. component: payment request button Apple Pay, Google Pay, etc priority: low The issue/PR is low priority—not many people are affected or there’s a workaround, etc. type: bug The issue is a confirmed bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants