• Resolved Julien

    (@igloo3)


    Hi,

    I need to add Paypal logo in checkout when a user selects this payment gateway, which is missing, such as Stripe, for example, as you can see this screen capture : https://snipboard.io/wLKc6O.jpg
    Cany ou please help me to do so ?
    Thanks and regards.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Krystian from Syde

    (@inpsydekrystian)

    Hello @igloo3

    Thank you for reaching out!

    Currently, the PayPal Payments plugin does not automatically display a payment gateway icon in the checkout. However, you can add a PayPal logo with a custom filter. Here’s a sample code snippet to help you achieve this:

    function woocommerce_paypal_payments_gateway_icon( $icon, $id ) {
        if ( $id === 'ppcp-gateway' ) {
            return '<img src="' . esc_url( plugins_url( 'woocommerce-paypal-payments/modules/ppcp-wc-gateway/assets/images/paypal.png' ) ) . '" > ';
        }
        if ( $id === 'ppcp-pay-upon-invoice-gateway' ) {
            return '<img src="' . esc_url( plugins_url( 'woocommerce-paypal-payments/modules/ppcp-wc-gateway/assets/images/paypal.png' ) ) . '" > ';
        } else {
            return $icon;
        }
    }
    add_filter( 'woocommerce_gateway_icon', 'woocommerce_paypal_payments_gateway_icon', 10, 2 );

    With this code, the PayPal logo will appear next to the PayPal payment options in checkout. Make sure to replace the img src URL with the location of the logo you prefer, if different from the one provided.

    Kind Regards,

    Krystian

    Thread Starter Julien

    (@igloo3)

    Perfect ! Thank you so much for your fast help.
    Have a nice day.

    Best regards

    Julien

    How can I hide my domain name from PayPal?

    Plugin Support Krystian from Syde

    (@inpsydekrystian)

    Hello @mednas12

    Thank you for your question.

    To keep the board clean and organized, please create your own thread for this topic. This will allow us to assist you more effectively with your specific request.

    Kind Regards,

    Krystian

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.