How do I change which payment icons are used?

The Stripe extension includes some assets to display payment method icons. When using the standard checkout experience, you can use the wc_stripe_payment_icons filter to use different icons than the ones included in the extension by default.

For example, to replace the existing Visa icon, you could use this snippet:

add_filter( 'wc_stripe_payment_icons', 'ah_change_stripe_icons' );

function ah_change_stripe_icons( $icons ) {
	// Use var_dump( $icons ); to show all possible icons.
	$icons['visa'] = '<img src="https://www.example.com/images/visa.svg" />';
	return $icons;
}

NOTE: We are unable to provide support for custom code under our Support Policy. If you need to customize a snippet further or extend its functionality, we highly recommend Codeable or a Certified WooExpert.

Related Products

Print USPS, UPS, and DHL labels right from your WooCommerce dashboard and instantly save on shipping. WooCommerce Shipping is free to use...

Let customers subscribe to your products or services and pay on a weekly, monthly or annual basis.