Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author syednazrulhassan

    (@nazrulhassanmca)

    /*Overide Stripe Icon on checkout*/
    function isa_extended_stripe_icon() {
    // picture of accepted credit card icons for PayPal payments
    return ‘/URL-TO-CUSTOM-LOGO/credit_card_icons.png’;
    }
    add_filter( ‘woocommerce_stripe_icon’, ‘isa_extended_stripe_icon’ );

    Plugin Author syednazrulhassan

    (@nazrulhassanmca)

    You need to place the above code in functions.php

    Thread Starter nichelead

    (@nichelead)

    Thank you for the fast response and help!

    I get this error when adding the snippet:
    Parse error: syntax error, unexpected ‘woocommerce_stripe_icon’ (T_STRING) in /home3/sg/public_html/wp-content/themes/kleo-child/functions.php on line 65

    Plugin Author syednazrulhassan

    (@nazrulhassanmca)

    you must be missing semicolon (;) in some line may be in line 64

    function isa_extended_stripe_icon() {
    return ‘/URL-TO-CUSTOM-LOGO/credit_card_icons.png’;
    }
    add_filter( ‘woocommerce_stripe_icon’, ‘isa_extended_stripe_icon’ );

    The last line should have a semicolon

    Thread Starter nichelead

    (@nichelead)

    Resolved!

    Apparently, there was some conflict with the apostrophes. when I changed the ‘my-image-url’ to “my-imageurl” it fixed the error.

    Thanks again!

    Plugin Author syednazrulhassan

    (@nazrulhassanmca)

    I am about to release new version so above code would change as i have added feature to show dynamic card logo based on card type allowed in admin so code would be

    function isa_extended_stripe_icon() {
    	$icon = '';
    	$icon .= '<img src="https://localhost/waynemcdonell/wp-content/themes/twentyfourteen/images/authorizenet.png" alt="Stripe Payment Gateway" />';
    return $icon;
    }
    add_filter( 'woocommerce_stripe_icon', 'isa_extended_stripe_icon' );
    Thread Starter nichelead

    (@nichelead)

    Thank You!
    I really appreciate it – you are the best!

    Plugin Author syednazrulhassan

    (@nazrulhassanmca)

    Good work needs support so it would be nice if you can ask your clients to donate

    Thread Starter nichelead

    (@nichelead)

    Sure thing!
    Check your Paypal ??

    Plugin Author syednazrulhassan

    (@nazrulhassanmca)

    Thank you so much

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘How to change to a custom Stripe Image/Icon on checkout page?’ is closed to new replies.