WC_Gateway_Paypal::get_icon()
Get gateway icon.
Description Description
Return Return
(string)
Source Source
File: includes/gateways/paypal/class-wc-gateway-paypal.php
public function get_icon() { // We need a base country for the link to work, bail if in the unlikely event no country is set. $base_country = WC()->countries->get_base_country(); if ( empty( $base_country ) ) { return ''; } $icon_html = ''; $icon = (array) $this->get_icon_image( $base_country ); foreach ( $icon as $i ) { $icon_html .= '<img src="' . esc_attr( $i ) . '" alt="' . esc_attr__( 'PayPal acceptance mark', 'woocommerce' ) . '" />'; } $icon_html .= sprintf( '<a href="%1$s" class="about_paypal" onclick="javascript:window.open(\'%1$s\',\'WIPaypal\',\'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=1060, height=700\'); return false;">' . esc_attr__( 'What is PayPal?', 'woocommerce' ) . '</a>', esc_url( $this->get_icon_url( $base_country ) ) ); return apply_filters( 'woocommerce_gateway_icon', $icon_html, $this->id ); }