Automattic\WooCommerce\Internal\Admin\Settings\PaymentProviders
WCCore::get_icon()
Get the provider icon URL of the payment gateway.
Метод класса: WCCore{}
Хуков нет.
Возвращает
Строку
. The provider icon URL of the payment gateway.
Использование
$WCCore = new WCCore(); $WCCore->get_icon( $payment_gateway ): string;
- $payment_gateway(WC_Payment_Gateway) (обязательный)
- The payment gateway object.
Код WCCore::get_icon() WCCore::get icon WC 9.6.1
public function get_icon( WC_Payment_Gateway $payment_gateway ): string { // Provide custom icons for core payment gateways. switch ( $payment_gateway->id ) { case 'bacs': return plugins_url( 'assets/images/payment_methods/bacs.svg', WC_PLUGIN_FILE ); case 'cheque': return plugins_url( 'assets/images/payment_methods/cheque.svg', WC_PLUGIN_FILE ); case 'cod': return plugins_url( 'assets/images/payment_methods/cod.svg', WC_PLUGIN_FILE ); case 'paypal': return plugins_url( 'assets/images/payment_methods/72x72/paypal.png', WC_PLUGIN_FILE ); } return parent::get_icon( $payment_gateway ); }