WC_Payment_Gateway::get_icon()publicWC 1.0

Return the gateway's icon.

Method of the class: WC_Payment_Gateway{}

Hooks from the method

Return

String.

Usage

$WC_Payment_Gateway = new WC_Payment_Gateway();
$WC_Payment_Gateway->get_icon();

WC_Payment_Gateway::get_icon() code WC 9.3.3

public function get_icon() {
	$icon = $this->icon ? '<img src="' . esc_url( WC_HTTPS::force_https_url( $this->icon ) ) . '" alt="' . esc_attr( $this->get_title() ) . '" />' : '';
	/**
	 * Filter the gateway icon.
	 *
	 * @since 1.5.8
	 * @param string $icon Gateway icon.
	 * @param string $id Gateway ID.
	 * @return string
	 */
	return apply_filters( 'woocommerce_gateway_icon', $icon, $this->id );
}