Support » Plugin: WooCommerce Sermepa payment gateway » Custom logo image

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author jesusangel.delpozo

    (@jesusangeldelpozo)

    I’ll try to add something to change the logo. In the meantime, you can overwrite it uploading a new one to: /wp-content/plugins/wc_sermepa_payment_gateway/assets/images/icons/redsys.png

    Plugin Author jesusangel.delpozo

    (@jesusangeldelpozo)

    Hello,

    With the last version (1.0.3) you can set your own logo adding a filter in functions.php

    For example:

    function cherrypick_child_wc_redsys_icon( $icon ) {

    if( file_exists( get_stylesheet_directory() . ‘/img/credit-card-logos-100×35.jpg’ ) )
    $icon = get_stylesheet_directory_uri() . ‘/img/credit-card-logos-100×35.jpg’;

    return $icon;

    }
    add_filter( ‘wc_redsys_icon’, ‘cherrypick_child_wc_redsys_icon’, 99, 1 );

    Thanks to @oscarestepa for the code.

    Kind regards,

    Thank you.

    Hi, i copied the code but if i put it in my fucntion.php the site goes down… i think there is a problem with it?..

    i’m using the last version of wordpress, woocommerce and plugin.

    Thank
    Angelo

    Hi Angelo, try with again the code from this post: Personalizando las imágenes de los medios de pago.

    Kind regards.

    Plugin Author jesusangel.delpozo

    (@jesusangeldelpozo)

    @angelo

    Hi,

    You must place that code in your theme’s functions.php file (i.e. wp-content/themes/yourtheme/functions.php), not in the global one (wp-include/functions.php).

    Kind regards,

    Yeah, i put the code in the theme function, but, the first one did work, the second yes!

    Thanks
    Angelo

    Sorry but I’m not able to display an image from my media library.

    It doesn’t recognize it and always shows the Redsys icon.

    Could you give me how can I check if the image is in the media library? I think that I’m not putting correctly the path.

    Thanks

    Plugin Author jesusangel.delpozo

    (@jesusangeldelpozo)

    Hi,

    The redsys default image is in wp-content/plugins/woocommerce-sermepa-payment-gateway/assets/images/icons/redsys.png.

    You can overwrite it, but is better to use a filter to show the image that you want. Write this in your theme’s functions.php file:

    function redsys_icon() {
            // Example: http://your_host/wp-content/themes/your_theme/icons/creditcard.png
            return get_template_directory_uri() . '/icons/creditcard.png';
    }
    add_filter( 'wc_redsys_icon', 'redsys_icon' );

    You have to copy the image into the folder named “icons” (or whatever you want) inside your theme folder.

    Kind regards,

    Hola, he hecho lo que me has comentado y no he conseguido que salga pero he añadido el icono que quería con el nombre redsys.png y he cambiado el nombre al original por redsys2.png.

    Con esto tendría solucionado el tema? Con las actualizaciones del plugin no se machacará la imagen de nuevo verdad?

    Otra cosa que quería preguntarte es si es posible cambiar el nombre por defecto Redsys (al lado del icono) por “Pago con tarjeta”

    (uso WMPL, igual debería cambiarlo ahí?)

    Gracias

    Perdón, ya lo he encontrado.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Custom logo image’ is closed to new replies.