Created
August 3, 2018 03:36
-
-
Save PiotrKrzyzek/a4dcbe149d6d112772df9a5933ea28c1 to your computer and use it in GitHub Desktop.
WooCommerce: Hide Stripe gateway payment icons on checkout page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Pick and chose which payment icons you'd want to show on the checkout page | |
* next to he payment gateways. The default in this function is to hide them all. | |
* Primarily made for stripe | |
*/ | |
add_filter( 'wc_stripe_payment_icons', 'show_hide_woocommerce_gateway_payment_icons' ); | |
function show_hide_woocommerce_gateway_payment_icons( $icons ) { | |
$icon_list = [ | |
"visa", | |
"amex", | |
"mastercard", | |
"discover", | |
"diners", | |
"jcb", | |
"alipay", | |
"wechat", | |
"bitcoin", | |
"bancontact", | |
"ideal", | |
"p24", | |
"giropay", | |
"eps", | |
"sofort", | |
"sepa" | |
]; | |
foreach($icon_list as $icon) | |
$icons[$icon] = ''; | |
return $icons; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment