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

    (@nazrulhassanmca)

    The credit card images are grey in Color and choosing cards in admin won’t change images for that you will to add your own image via hook on function.php of theme

    Plugin Author syednazrulhassan

    (@nazrulhassanmca)

    The custom cards image you allow can be applied by adding this to functions.php and by replacing your actual image URL

    function isa_extended_authorize_icon() {
    return ‘https://localhost/waynemcdonell/wp-content/themes/twentyfourteen/images/Untitled.png’;
    }
    add_filter( ‘woocommerce_authorizenet_icon’, ‘isa_extended_authorize_icon’ );

    In above you will have to replace https://localhost/waynemcdonell/wp-content/themes/twentyfourteen/images/Untitled.png with your local Image urls that will overide image shown on checkout page

    Plugin Author syednazrulhassan

    (@nazrulhassanmca)

    However i can implement dynamic feature to show credit card images in future releases based on donation to keep me motivated always

    however if you can write your own custom code you can use following functions to do so

    public function get_icon() {
    		$icon = '';
    		if(is_array($this->authorizenet_cardtypes ))
    		{
            foreach ($this->authorizenet_cardtypes as $card_type ) {
    
    			if ( $url = $this->get_payment_method_image_url( $card_type ) ) {
    
    				$icon .= '<img src="' . esc_url( $url ) . '" alt="' . esc_attr( strtolower( $card_type ) ) . '" />';
    			}
    		  }
    		}
    		else
    		{
    			$icon .= '<img src="' . esc_url( plugins_url( 'images/merchantone.png' , __FILE__ ) ).'" alt="Authorize.Net Gateway" />';
    		}
    
             return apply_filters( 'woocommerce_authorizenet_icon', $icon, $this->id );
    		}
    
    		public function get_payment_method_image_url( $type ) {
    
    		$image_type = strtolower( $type );
    
    			return  WC_HTTPS::force_https_url( plugins_url( 'images/' . $image_type . '.png' , __FILE__ ) );
    		}

    and there should be images in plugins images directory as visa.png ,discover.png ,etc

    Plugin Author syednazrulhassan

    (@nazrulhassanmca)

    New Version released has this feature of dynamic cards logo

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Credit Card’ is closed to new replies.