When the Stripe WooCommerce Extension is installed on your site, it includes some assets to display payment icons.
You can use the wc_stripe_payment_icons
filter to use different icons than those included in the extension.
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.
For example, to replace the existing Visa icon asset with one hosted at https://example.com/images/visa.svg
, you would use this snippet:
add_filter( 'wc_stripe_payment_icons', 'change_my_icons' );
function change_my_icons( $icons ) {
// var_dump( $icons ); to show all possible icons to change.
$icons['visa'] = '<img src="https://example.com/images/visa.svg" />';
return $icons;
}