Skip to content

Instantly share code, notes, and snippets.

@robin-scott
Created August 31, 2017 21:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robin-scott/341922bc2cdfd4c734618e71cb471b88 to your computer and use it in GitHub Desktop.
Save robin-scott/341922bc2cdfd4c734618e71cb471b88 to your computer and use it in GitHub Desktop.
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