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

Stripe Tax for WooCommerce is your gateway to Stripe’s end-to-end tax solution. Calculate and collect tax globally in your WooCommerce...

Automatically calculate how much sales tax should be collected for WooCommerce orders — by city, country, or state — at checkout.

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.