Изменение значков платежных карт для WooCommerce Stripe при оформлении заказаPhp

Кемеровские программисты 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 ... n-checkout

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