Thanks for the feedback and apologies for the inconvenient change.
This change was mainly introduced because of the (early access) new checkout experience, which can offer multiple Stripe payment methods under the same payment gateway option on the checkout page.
Other than the inconsistency with that, we also had another issue where the icons would appear misaligned in different templates, because of the amount of icons, hence the first change where we introduced the rotating credit card brands, which were consistent with the new checkout experience.
We’re taking your feedback into consideration for the next releases.
For now, I would recommend @jkohlbach’s alternative to bring the icons back. Here’s a snippet for all the credit card brands:
function add_credit_card_gateway_icons( $icon_string, $gateway_id ) {
if ( 'stripe' === $gateway_id ) {
$icon_string = '<img src="' . WC_STRIPE_PLUGIN_URL . '/assets/images/visa.svg" class="stripe-visa-icon stripe-icon" alt="Visa" />';
$icon_string .= '<img src="' . WC_STRIPE_PLUGIN_URL . '/assets/images/mastercard.svg" class="stripe-mastercard-icon stripe-icon" alt="Mastercard" />';
$icon_string .= '<img src="' . WC_STRIPE_PLUGIN_URL . '/assets/images/amex.svg" class="stripe-amex-icon stripe-icon" alt="American Express" />';
$icon_string .= '<img src="' . WC_STRIPE_PLUGIN_URL . '/assets/images/discover.svg" class="stripe-discover-icon stripe-icon" alt="Discover" />';
$icon_string .= '<img src="' . WC_STRIPE_PLUGIN_URL . '/assets/images/diners.svg" class="stripe-diners-icon stripe-icon" alt="Diners" />';
$icon_string .= '<img src="' . WC_STRIPE_PLUGIN_URL . '/assets/images/jcb.svg" class="stripe-jcb-icon stripe-icon" alt="JCB" />';
}
return $icon_string;
}
add_filter( 'woocommerce_gateway_icon', 'add_credit_card_gateway_icons', 10, 2 );