Automattic\WooCommerce\Internal\Admin\WCPayPromotion
DefaultPromotions::get_wcpay_payment_icons
Get the list of payment icons as HTML img tags.
Метод класса: DefaultPromotions{}
Хуков нет.
Возвращает
Строку. Payment icons as HTML img tags.
Использование
$result = DefaultPromotions::get_wcpay_payment_icons(): string;
Код DefaultPromotions::get_wcpay_payment_icons() DefaultPromotions::get wcpay payment icons WC 10.3.6
private static function get_wcpay_payment_icons(): string {
$icons = array(
'visa',
'mastercard',
'amex',
'googlepay',
'applepay',
);
$convert_to_img_tag = function ( $icon ) {
return sprintf(
'<img class="wcpay-%s-icon wcpay-icon" src="%s" alt="%s">',
$icon,
plugins_url( "assets/images/payment-methods/$icon.svg", WC_PLUGIN_FILE ),
ucfirst( $icon )
);
};
return implode( '', array_map( $convert_to_img_tag, $icons ) );
}