woocommerce_gateway_icon
Filter the gateway icon.
Usage
add_filter( 'woocommerce_gateway_icon', 'wp_kama_woocommerce_gateway_icon_filter', 10, 2 );
/**
* Function for `woocommerce_gateway_icon` filter-hook.
*
* @param string $icon Gateway icon.
* @param string $id Gateway ID.
*
* @return string
*/
function wp_kama_woocommerce_gateway_icon_filter( $icon, $id ){
// filter...
return $icon;
}
- $icon(string)
- Gateway icon.
- $id(string)
- Gateway ID.
Changelog
| Since 1.5.8 | Introduced. |
Where the hook is called
woocommerce_gateway_icon
woocommerce_gateway_icon
woocommerce/includes/abstracts/abstract-wc-payment-gateway.php 403
return apply_filters( 'woocommerce_gateway_icon', $icon, $this->id );
woocommerce/includes/gateways/paypal/class-wc-gateway-paypal.php 429
return apply_filters( 'woocommerce_gateway_icon', $icon_html, $this->id );