Support » Plugin: WooCommerce Smart COD » I added an image for the payment method

  • Hi, analyzing the now extint Woocommerce Advanced COD plugin, i managed to ad an icon on checkout page to your plugin.
    Here is the code i used.

    add_filter(‘woocommerce_gateway_icon’,array($this,’adv_cod_gateway_icon’),9,2);

    /****************************
    COD ICON
    ****************************/
    function adv_cod_gateway_icon($icon_html,$id)
    {
    $settings = get_option(‘woocommerce_cod_settings’);
    if($id==’cod’){
    $image = plugins_url(‘images/cod-icon.png’, __FILE__);
    $icon_html = ‘‘;
    }
    return $icon_html;
    }

    you can see the result on checkout page here: https://www.topfashioncolombia.com

  • The topic ‘I added an image for the payment method’ is closed to new replies.