9 Replies to “Change any WordPress WooCommerce Payment Gateway Icon”

  1. Hi, this is great however what if you wanted to remove the <img src markup that surrounds the filter contents in an aim to add font awesome icons. As I like to keep images to a minimum I would like to do this with all checkout icons. Any ideas?

  2. Hi David,

    Thanks for writing. I don’t use Font Awesome, but it’s just a matter of generating the proper HTML markup. Assuming you have Font Awesome already installed and working… simply replace the HTML with whatever markup you wish. This page shows the markup required to display the Font Awesome payment icons: fortawesome.github.io/Font-Awesome/icons/#payment

    So replace this:

    return '<img src="' . get_bloginfo('stylesheet_directory') . '/images/woocommerce-icons/cards.png" alt="Authorize.net" />';

    With something like this:

    return '<i class="fa fa-cc-visa"></i><i class="fa fa-cc-mastercard"></i>';

    Good luck and let me know how that works.

  3. Hi.

    Can you possibly tell me what my $id value would be for using PayPal or WorldPay as opposed to Authorize.

    Want to use the solution WooThemes sent you but it’s failing when I try:
    if ( $id === 'payment_method_paypal' ) {.

    1. Thanks for writing Elija. Your question is a bit off-topic from this posting. However, I’m not familiar enough with WooCommerce to know the answer anyway.

  4. hi, what if i want to do this with another 2 images?

    i did it with one payment gateway but i can’t put the image for the other ones

Leave a Reply

Your email address will not be published. Required fields are marked *