• Resolved K15Lmk98

    (@k15lmk98)


    This is an automatic translation

    Good morning,
    I tried to change the PayPal logo with this snippet but it does not work.
    How can I change the default logo of Your plugin with hook?

    Thanks, Claudio_

    Code snippet:

    function isa_extended_paypal_icon() {
    // picture of accepted credit card icons for PayPal payments
    return get_stylesheet_directory_uri() . ‘/images/paypal-payments.jpg’;
    }
    add_filter( ‘woocommerce_paypal_icon’, ‘isa_extended_paypal_icon’ );

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author wpgateways

    (@wpgateways)

    Hello @k15lmk98,

    Please see the example: https://pastebin.com/QhwWty9L

    Let me know if it is not working for you.

    Thanks!

    Thread Starter K15Lmk98

    (@k15lmk98)

    Hello,
    Ok, it works fine.

    There is only a syntax error in the function declaration (functinon)

    Thanks, Claudio_

    Correct code:

    add_filter( ‘woocommerce_gateway_icon’, ‘isa_extended_paypal_icon’, 10, 2 );
    function isa_extended_paypal_icon($icon, $id) {
    if($id == ‘express_checkout’) {
    $image_path = get_stylesheet_directory_uri() . ‘/images/paypal-payments.jpg’;
    $icon = ““;
    }
    return $icon;
    }

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change the PayPal express logo with hook’ is closed to new replies.