PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

How can I hide the AMEX and Discover Logos?

  1. Here is the page / site in question...

    http://lccap.digitalskydesign.com/give-help/donate/

    I'm using Gravity Forms with a Developers License and the Authorize.net plugin. Apparently according to my client the 3rd party that they are using Authorize.net through does not accept Discover or AMEX cards. I'm trying to figure out a way I can therefore remove those credit card logos for Discover and AMEX on my 'Donation' page in the link above.

    I can't seem to find anything in the settings so I thought I would ask and hope there's a simple solution.

    Thanks!

    Posted 11 years ago on Tuesday December 18, 2012 | Permalink
  2. You can use the gform_creditcard_types filter to remove card types:

    http://www.gravityhelp.com/documentation/page/Gform_creditcard_types

    Posted 11 years ago on Tuesday December 18, 2012 | Permalink
  3. Do you know if adding that filter will remove the card type images from the donation form?

    Posted 11 years ago on Tuesday December 18, 2012 | Permalink
  4. This code worked...

    add_filter("gform_creditcard_types", "remove_amex");
    function remove_amex($cards){
        unset($cards[0]); // Removes AMEX from the list.
        return $cards;
    }
    
    add_filter("gform_creditcard_types", "remove_discover");
    function remove_discover($cards){
        unset($cards[1]); // Removes Discover from the list.
        return $cards;
    }

    You can edit that code as you see fit, but using that code in my themes function.php file I was able to remove AMEX and Discover cards from the 'accepted' card types. The system was smart enough to remove the card logos from the payment form as well.

    So, problem solved, just thought I'd share the solution for anyone who runs across the same problem.

    Posted 11 years ago on Tuesday December 18, 2012 | Permalink
  5. David Peralty

    Thanks for sharing, I'm sure it will help others.

    Posted 11 years ago on Tuesday December 18, 2012 | Permalink
  6. I was just configuring a form with the credit card field, and there are checkboxes which can enable or disable specific credit card types. You initially mentioned there was nothing in the settings, but these settings are present on the credit card field when you add it to your form. That way might be easier than using a custom function. Screenshot http://minus.com/lcCgKM6XFI7rK

    Posted 11 years ago on Wednesday December 26, 2012 | Permalink