Skip to content

Commit

Permalink
fix cardlink logo image url
Browse files Browse the repository at this point in the history
  • Loading branch information
dimosKougiou committed May 27, 2024
1 parent aee7f2f commit 26d7e84
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions includes/class-cardlink-payment-gateway-woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -363,12 +363,15 @@ public function __construct() {
'check_cardlink_response'
) );

$current_path = plugins_url('', __FILE__);
$plugin_root_path = str_replace("/includes", "", $current_path);

if ( $this->acquirer == 0 ) {
$this->icon = apply_filters( 'cardlink_icon', plugins_url() . '/cardlink-payment-gateway-woocommerce/public/img/cardlink.png' );
$this->icon = apply_filters( 'cardlink_icon', $plugin_root_path . '/public/img/cardlink.png' );
} elseif ( $this->acquirer == 1 ) {
$this->icon = apply_filters( 'cardlink_icon', plugins_url() . '/cardlink-payment-gateway-woocommerce/public/img/cardlink.png' );
$this->icon = apply_filters( 'cardlink_icon', $plugin_root_path . '/public/img/cardlink.png' );
} elseif ( $this->acquirer == 2 ) {
$this->icon = apply_filters( 'cardlink_icon', plugins_url() . '/cardlink-payment-gateway-woocommerce/public/img/cardlink.png' );
$this->icon = apply_filters( 'cardlink_icon', $plugin_root_path . '/public/img/cardlink.png' );
}

}
Expand Down

0 comments on commit 26d7e84

Please sign in to comment.