Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
WooCommerce Gateway Stripe Icon Remover
// Rob Scott makes the icon for diners and jcb disappear pfft like magic
function rs_removed_icon( $icons ) {
$icons = str_replace( '<img src="[your absolute url to...]/assets/images/icons/credit-cards/jcb.svg" alt="JCB" width="32" style="margin-left: 0.3em" />', '', $icons );
$icons = str_replace( '<img src="[your absolute url to...]/assets/images/icons/credit-cards/diners.svg" alt="Diners" width="32" style="margin-left: 0.3em" />', '', $icons );
return $icons;
add_filter( 'woocommerce_gateway_icon', 'rs_removed_icon');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.