Accepted Credit Card Icons Missing at Checkout
-
Hi Support Team,
Please see link: http://prnt.sc/uob5mq
You’ll notice from my screenshot from the above link shows my various payment options for my site at checkout. Eway, Paypal, Google Pay, Alipay, Stripe etc. Eway is the only one without any icons next to it’s name. How do I go about adding the accepted credit cards for Eway just like the other ones in the screenshot. Icons like Visa, Master Card, American Express, JCB etc. Will you have a plugin update that will right align those accepted cards like the rest?
-
Hey @rzurxn
Currently, this isn’t an available option in the eWay payment method.
It would be great to have you add your ideas to the Ideas Board, which is where developers go to look for future plugin features and improvements – https://ideas.woocommerce.com/forums/133476-woocommerce/suggestions/34596385-display-accepted-card-icons-on-checkout-form
It may be possible to add these icons via some custom code. Adding this to the
functions.php
file of your theme would be a start:add_filter( 'woocommerce_gateway_icon', 'add_eway_icons', 10, 2); function add_eway_icons( $icon_string, $id ) { if($id=="eway"){ $methods = array( 'visa' => '<img src="' . plugins_url() . '/woocommerce-gateway-stripe/assets/images/visa.svg" class="stripe-visa-icon stripe-icon" alt="Visa" />', 'mastercard' => '<img src="' . plugins_url() . '/woocommerce-gateway-stripe/assets/images/mastercard.svg" class="stripe-mastercard-icon stripe-icon" alt="Mastercard" />', ); $icon_string = implode("", $methods); } return $icon_string; }
For ease, I’m using icons already in use by another payment method, Stripe.
You would need to have the Stripe payment gateway installed. Alternatively, you can upload any images and link them instead.I’m not a developer and so this code might not be ideal but hopefully it is a start.
Thanks,
Thanks Doug.
I will give that a try.
Hi @rzurxn
You’re welcome – I’ll mark this as resolved – if you have any further questions, you can start a new thread.
Thanks,
- The topic ‘Accepted Credit Card Icons Missing at Checkout’ is closed to new replies.