Skip to content

Commit

Permalink
Merge pull request #241 from buckaroo-it/develop
Browse files Browse the repository at this point in the history
v3.12.0
  • Loading branch information
vegimcarkaxhija authored Apr 29, 2024
2 parents 5143444 + c6a3460 commit f931937
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 514 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"issues": "https://docs.buckaroo.io/docs/en/contact-us"
},
"homepage": "https://www.buckaroo.nl",
"version" : "3.11.1",
"version" : "3.12.0",
"minimum-stability": "stable",
"config": {
"allow-plugins": {
Expand Down
23 changes: 4 additions & 19 deletions gateway-buckaroo-in3.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
class WC_Gateway_Buckaroo_In3 extends WC_Gateway_Buckaroo
{
const PAYMENT_CLASS = BuckarooIn3::class;
public const DEFAULT_ICON_VALUE = 'defaultIcon';
public const VERSION_FLAG = 'buckaroo_in3_version';
public const VERSION3 = 'v3';
public const VERSION2 = 'v2';
Expand Down Expand Up @@ -136,16 +135,13 @@ public function process_payment($order_id)
*/
private function set_icons()
{
$icon = $this->get_option('icon');

if (
$this->get_option('api_version') === 'v2' ||
$icon === self::DEFAULT_ICON_VALUE
$this->get_option('api_version') === 'v2'
) {
$this->setIcon('svg/in3.svg', 'svg/in3.svg');
return;
}
$this->setIcon($icon, $icon);
$this->setIcon('svg/in3-ideal.svg', 'svg/in3-ideal.svg');
}

/**
Expand Down Expand Up @@ -221,17 +217,6 @@ public function init_form_fields()
),
'default' => self::VERSION3
);

$this->form_fields['icon'] = array(
'title' => __('Payment Logo', 'wc-buckaroo-bpe-gateway'),
'type' => 'in3_logo',
'description' => __('Determines the logo that will be shown in the checkout', 'wc-buckaroo-bpe-gateway'),
'options' => array(
'svg/in3-ideal.svg' => BuckarooConfig::getIconPath('svg/in3-ideal.svg', 'svg/in3-ideal.svg'),
self::DEFAULT_ICON_VALUE => BuckarooConfig::getIconPath('svg/in3.svg', 'svg/in3.svg'),
),
'default' => 'svg/in3-ideal.svg'
);
}


Expand Down Expand Up @@ -266,7 +251,7 @@ public function generate_in3_logo_html($key, $data)
?>
<tr valign="top">
<th scope="row" class="titledesc">
<label for="<?php echo esc_attr($field_key); ?>"><?php echo wp_kses_post($data['title']); ?> <?php echo $this->get_tooltip_html($data); // WPCS: XSS ok.
<label for="<?php echo esc_attr($field_key); ?>"><?php echo wp_kses_post($data['title']); ?> <?php echo $this->get_tooltip_html($data); // WPCS: XSS ok.
?></label>
</th>
<td>
Expand All @@ -280,7 +265,7 @@ public function generate_in3_logo_html($key, $data)
</label>
<?php endforeach; ?>
</div>
<?php echo $this->get_description_html($data); // WPCS: XSS ok.
<?php echo $this->get_description_html($data); // WPCS: XSS ok.
?>
</fieldset>
</td>
Expand Down
3 changes: 0 additions & 3 deletions gateway-buckaroo.php
Original file line number Diff line number Diff line change
Expand Up @@ -861,9 +861,6 @@ public function getParsedLabel(WC_Order $order)
$label = preg_replace('/\{product_name\}/', array_values($products)[0]->get_name(), $label);
}

if($this->id === 'buckaroo_paybybank') {
$label = preg_replace("/[^A-Za-z0-9\/\-\?:\(\)\.,'\+]/", '', $label);
}
$label = preg_replace("/\r?\n|\r/", '', $label);

return mb_substr($label, 0, 244);
Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Author: Buckaroo
Author URI: http://www.buckaroo.nl
Description: Buckaroo payment system plugin for WooCommerce.
Version: 3.11.1
Version: 3.12.0
Text Domain: wc-buckaroo-bpe-gateway
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down
Loading

0 comments on commit f931937

Please sign in to comment.