Программное изменение значков платежных карт в кассе WooCommerce StripePhp

Кемеровские программисты php общаются здесь
Гость
Программное изменение значков платежных карт в кассе WooCommerce Stripe

Сообщение Гость »


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;
}
Could someone please modify this code snippet to change the payment card icon order to Visa > Mastercard > Amex > Discover > JCB > Diners Club?
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 ... e-checkout

Вернуться в «Php»