I would like to sort the Stripe displayed payment card icons in a different way in WooCommerce checkout.

WooCommerce Stripe plugin support does not provide custom code support so they just gave me a code snippet to modify according to my needs. This code snippet changes out the Visa payment icon:
Код: Выделить всё
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]https://shipyouridea.com/wp-content/plugins/woocommerce/assets/images/icons/credit-cards/visa.svg[/img]
'; return $icons; }
I would also like to completely remove the JCB and Diners Club payment icons. I'm currently using some custom CSS to hide these icons but was wondering if there's a better way.
Источник: https://stackoverflow.com/questions/661 ... n-checkout