Skip to content

Commit

Permalink
update payment icons
Browse files Browse the repository at this point in the history
  • Loading branch information
leviothan committed Apr 3, 2018
1 parent 6c6326f commit edda41d
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 112 deletions.
12 changes: 0 additions & 12 deletions assets/images/icons/bch.svg

This file was deleted.

12 changes: 0 additions & 12 deletions assets/images/icons/btc.svg

This file was deleted.

Binary file removed assets/images/icons/crypto.png
Binary file not shown.
12 changes: 0 additions & 12 deletions assets/images/icons/dash.svg

This file was deleted.

56 changes: 0 additions & 56 deletions assets/images/icons/eth.svg

This file was deleted.

14 changes: 0 additions & 14 deletions assets/images/icons/ltc.svg

This file was deleted.

10 changes: 4 additions & 6 deletions class-wc-gateway-paybear.php
Original file line number Diff line number Diff line change
Expand Up @@ -331,15 +331,13 @@ protected function __construct() {

public function get_icon()
{
$plugin_url = plugin_dir_url( __FILE__ );
$style = version_compare( WC()->version, '2.6', '>=' ) ? 'style="margin-left: 0.2em; max-height: 24px; max-width: 24px; float: left"' : '';
$style = version_compare( WC()->version, '2.6', '>=' ) ? 'style="margin-left: 0.5em; max-height: 24px; max-width: 24px; float: left"' : '';

$icons = ['btc', 'eth', 'bch', 'ltc', 'dash'];
$currencies = array_keys($this->get_currencies());
$currencies = $this->get_currencies();
$icon = '<span style="float: right">';

foreach (array_intersect($icons, $currencies) as $token) {
$icon .= '<img src="'.apply_filters( 'woocommerce_gateway_icon', $plugin_url.'assets/images/icons/'.$token.'.svg' ).'" '.$style.'>';
foreach (array_slice($currencies, 0, 5) as $currency) {
$icon .= '<img src="'.$currency['icon'].'" '.$style.'>';
}
$icon .= '</span>';

Expand Down

0 comments on commit edda41d

Please sign in to comment.