Support » Plugin: WooCommerce Stripe Payment Gateway » How to hide “via woocommerce” on Google Pay checkout

  • Resolved David

    (@davidrgz)


    HI,
    Does anyone knows how to hide that annoying and deterrent legend from Google Pay checkout? Customers get scared when they see woocommerce, because they don´t understand it nor know what is.

    I tried adding this code to funtions.php :

    add_filter( ‘wc_stripe_payment_request_total_label_suffix’, ‘__return_null’ );

    … but didn´t work.

    Thanks for reading.

    David.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello @davidrgz ,

    Okay, this was an interesting topic.

    The filter you are working with is correct but this does not work if we use it on the theme’s functions.php file.

    We need to run this before Stripe is loaded. I have tried the code using a snippet plugin and it worked properly.

    For extreme cases, you can use the must-use plugin solution to run a code before every other plugin. More details are here – https://www.wpdevguides.com/guides/how-to-create-a-mu-plugin-must-use-plugin

    Thank you 🙂

    Thread Starter David

    (@davidrgz)

    Thank you Rashed. Perfectly explained!!

    I will ask DIVI theme support how to add an snippet to my site (I am an ignorant on these matters)

    Thread Starter David

    (@davidrgz)

    It didn´t work.
    I created a MU plugin and a Text file inside with this code:

    <?php
    /*
    Plugin Name: wpdevguides.com must use plugins
    Description: code that is used always
    Version: 1.0.0
    Author: WP Developer Guides
    Author URI: wpdevguides.com
    */
    
    add_filter( ‘wc_stripe_payment_request_total_label_suffix’, ‘__return_null’ );

    …But it didn´t work.

    What am I missing?

    Thank you

    David.

    Hello @davidrgz ,

    Your implementation seems to be correct.

    It’s possible that the single quotes on your code are not working properly. Try to copy the code from this Gist of mine – https://gist.github.com/rashedripon/8f5945b46775ef695919349680c1501c

    Also, I succeeded by using this with a snippet plugin as well. You can take help from an expert from sites like Fiverr to help you do these quick tasks.

    Thank you 🙂

    Hi there,

    We’ve not heard back from you in a while, so I’m marking this thread as resolved.

    Hopefully, you were able to find a solution to your problem! If you have further questions, please feel free to open a new topic.

    Thank you 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to hide “via woocommerce” on Google Pay checkout’ is closed to new replies.