Mollie Payments for WooCommerce - Version 6.2.1

Version Description

  • 01-04-2021 =

  • Fix - Transaction ID missing

Download this release

Release Info

Developer carmen222
Plugin Icon wp plugin Mollie Payments for WooCommerce
Version 6.2.1
Comparing to
See all releases

Code changes from version 6.2.0 to 6.2.1

mollie-payments-for-woocommerce.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Mollie Payments for WooCommerce
4
  * Plugin URI: https://www.mollie.com
5
  * Description: Accept payments in WooCommerce with the official Mollie plugin
6
- * Version: 6.2.0
7
  * Author: Mollie
8
  * Author URI: https://www.mollie.com
9
  * Requires at least: 3.8
@@ -100,20 +100,19 @@ function mollieWcNoticeApiKeyMissing(){
100
 
101
  function mollie_wc_plugin_autoload()
102
  {
103
- $autoloader = __DIR__ . '/vendor/autoload.php';
104
- $mollieSdkAutoload = __DIR__ . '/vendor/mollie/mollie-api-php/vendor/autoload.php';
105
- if (file_exists($autoloader)) {
106
- /** @noinspection PhpIncludeInspection */
107
- require $autoloader;
108
- }
109
-
110
- if (file_exists($mollieSdkAutoload)) {
111
- /** @noinspection PhpIncludeInspection */
112
- require $mollieSdkAutoload;
113
- }
114
- return class_exists(Mollie_WC_Plugin::class);
115
- }
116
 
 
 
 
 
 
 
117
  function mollie_wc_plugin_init() {
118
  load_plugin_textdomain('mollie-payments-for-woocommerce', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/');
119
  Mollie_WC_Plugin::init();
3
  * Plugin Name: Mollie Payments for WooCommerce
4
  * Plugin URI: https://www.mollie.com
5
  * Description: Accept payments in WooCommerce with the official Mollie plugin
6
+ * Version: 6.2.1
7
  * Author: Mollie
8
  * Author URI: https://www.mollie.com
9
  * Requires at least: 3.8
100
 
101
  function mollie_wc_plugin_autoload()
102
  {
103
+ $autoloader = __DIR__ . '/vendor/autoload.php';
104
+ $mollieSdkAutoload = __DIR__ . '/vendor/mollie/mollie-api-php/vendor/autoload.php';
105
+ if (file_exists($autoloader)) {
106
+ /** @noinspection PhpIncludeInspection */
107
+ require $autoloader;
108
+ }
 
 
 
 
 
 
 
109
 
110
+ if (file_exists($mollieSdkAutoload)) {
111
+ /** @noinspection PhpIncludeInspection */
112
+ require $mollieSdkAutoload;
113
+ }
114
+ return class_exists(Mollie_WC_Plugin::class);
115
+ }
116
  function mollie_wc_plugin_init() {
117
  load_plugin_textdomain('mollie-payments-for-woocommerce', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/');
118
  Mollie_WC_Plugin::init();
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: daanvm, danielhuesken, davdebcom, dinamiko, inpsyde, l.vangunst, n
3
  Tags: mollie, payments, payment gateway, woocommerce, credit card, ideal, bancontact, klarna, sofort, giropay, woocommerce subscriptions
4
  Requires at least: 3.8
5
  Tested up to: 5.7
6
- Stable tag: 6.2.0
7
  Requires PHP: 5.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -181,6 +181,10 @@ Automatic updates should work like a charm; as always though, ensure you backup
181
 
182
  == Changelog ==
183
 
 
 
 
 
184
  = 6.2.0 - 22-03-2021 =
185
 
186
  * Feature - No longer support for WooCommerce version below 3.0
3
  Tags: mollie, payments, payment gateway, woocommerce, credit card, ideal, bancontact, klarna, sofort, giropay, woocommerce subscriptions
4
  Requires at least: 3.8
5
  Tested up to: 5.7
6
+ Stable tag: 6.2.1
7
  Requires PHP: 5.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
181
 
182
  == Changelog ==
183
 
184
+ = 6.2.1 - 01-04-2021 =
185
+
186
+ * Fix - Transaction ID missing
187
+
188
  = 6.2.0 - 22-03-2021 =
189
 
190
  * Feature - No longer support for WooCommerce version below 3.0
src/Mollie/WC/Gateway/IngHomePay.php DELETED
@@ -1,46 +0,0 @@
1
- <?php
2
-
3
- use Mollie\Api\Types\PaymentMethod;
4
-
5
- class Mollie_WC_Gateway_IngHomePay extends Mollie_WC_Gateway_AbstractSepaRecurring {
6
- /**
7
- *
8
- */
9
- public function __construct() {
10
- $this->supports = array (
11
- 'products',
12
- 'refunds',
13
- );
14
-
15
- parent::__construct();
16
- }
17
-
18
- /**
19
- * @return string
20
- */
21
- public function getMollieMethodId() {
22
- return PaymentMethod::INGHOMEPAY;
23
- }
24
-
25
- /**
26
- * @return string
27
- */
28
- public function getDefaultTitle() {
29
- return __( 'ING Home\'Pay', 'mollie-payments-for-woocommerce' );
30
- }
31
-
32
- /**
33
- * @return string
34
- */
35
- protected function getSettingsDescription() {
36
- return '';
37
- }
38
-
39
- /**
40
- * @return string
41
- */
42
- protected function getDefaultDescription() {
43
- return '';
44
- }
45
-
46
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/Mollie/WC/Payment/Order.php CHANGED
@@ -245,7 +245,7 @@ class Mollie_WC_Payment_Order extends Mollie_WC_Payment_Object {
245
  // Add messages to log
246
  Mollie_WC_Plugin::debug( __METHOD__ . " called for order {$orderId}" );
247
 
248
- $order->payment_complete();
249
 
250
  // Add messages to log
251
  Mollie_WC_Plugin::debug( __METHOD__ . ' WooCommerce payment_complete() processed and returned to ' . __METHOD__ . " for order {$orderId}" );
@@ -296,7 +296,7 @@ class Mollie_WC_Payment_Order extends Mollie_WC_Payment_Object {
296
  Mollie_WC_Plugin::debug( __METHOD__ . ' called for order ' . $orderId );
297
 
298
  // WooCommerce 2.2.0 has the option to store the Payment transaction id.
299
- $order->payment_complete();
300
 
301
  // Add messages to log
302
  Mollie_WC_Plugin::debug( __METHOD__ . ' WooCommerce payment_complete() processed and returned to ' . __METHOD__ . ' for order ' . $orderId );
@@ -340,7 +340,7 @@ class Mollie_WC_Payment_Order extends Mollie_WC_Payment_Object {
340
  // Add messages to log
341
  Mollie_WC_Plugin::debug( __METHOD__ . ' called for order ' . $orderId );
342
 
343
- $order->payment_complete();
344
  // Add messages to log
345
  Mollie_WC_Plugin::debug( __METHOD__ . ' WooCommerce payment_complete() processed and returned to ' . __METHOD__ . ' for order ' . $orderId );
346
 
245
  // Add messages to log
246
  Mollie_WC_Plugin::debug( __METHOD__ . " called for order {$orderId}" );
247
 
248
+ $order->payment_complete($payment->id);
249
 
250
  // Add messages to log
251
  Mollie_WC_Plugin::debug( __METHOD__ . ' WooCommerce payment_complete() processed and returned to ' . __METHOD__ . " for order {$orderId}" );
296
  Mollie_WC_Plugin::debug( __METHOD__ . ' called for order ' . $orderId );
297
 
298
  // WooCommerce 2.2.0 has the option to store the Payment transaction id.
299
+ $order->payment_complete($payment->id);
300
 
301
  // Add messages to log
302
  Mollie_WC_Plugin::debug( __METHOD__ . ' WooCommerce payment_complete() processed and returned to ' . __METHOD__ . ' for order ' . $orderId );
340
  // Add messages to log
341
  Mollie_WC_Plugin::debug( __METHOD__ . ' called for order ' . $orderId );
342
 
343
+ $order->payment_complete($payment->id);
344
  // Add messages to log
345
  Mollie_WC_Plugin::debug( __METHOD__ . ' WooCommerce payment_complete() processed and returned to ' . __METHOD__ . ' for order ' . $orderId );
346
 
src/Mollie/WC/Payment/Payment.php CHANGED
@@ -204,7 +204,7 @@ class Mollie_WC_Payment_Payment extends Mollie_WC_Payment_Object {
204
  Mollie_WC_Plugin::debug( __METHOD__ . ' called for payment ' . $orderId );
205
 
206
  // WooCommerce 2.2.0 has the option to store the Payment transaction id.
207
- $order->payment_complete();
208
 
209
  // Add messages to log
210
  Mollie_WC_Plugin::debug( __METHOD__ . ' WooCommerce payment_complete() processed and returned to ' . __METHOD__ . ' for payment ' . $orderId );
204
  Mollie_WC_Plugin::debug( __METHOD__ . ' called for payment ' . $orderId );
205
 
206
  // WooCommerce 2.2.0 has the option to store the Payment transaction id.
207
+ $order->payment_complete($payment->id);
208
 
209
  // Add messages to log
210
  Mollie_WC_Plugin::debug( __METHOD__ . ' WooCommerce payment_complete() processed and returned to ' . __METHOD__ . ' for payment ' . $orderId );
src/Mollie/WC/Plugin.php CHANGED
@@ -8,7 +8,7 @@ class Mollie_WC_Plugin
8
  {
9
  const PLUGIN_ID = 'mollie-payments-for-woocommerce';
10
  const PLUGIN_TITLE = 'Mollie Payments for WooCommerce';
11
- const PLUGIN_VERSION = '6.2.0';
12
 
13
  const DB_VERSION = '1.0';
14
  const DB_VERSION_PARAM_NAME = 'mollie-db-version';
8
  {
9
  const PLUGIN_ID = 'mollie-payments-for-woocommerce';
10
  const PLUGIN_TITLE = 'Mollie Payments for WooCommerce';
11
+ const PLUGIN_VERSION = '6.2.1';
12
 
13
  const DB_VERSION = '1.0';
14
  const DB_VERSION_PARAM_NAME = 'mollie-db-version';
src/subscriptions_status_check_functions.php CHANGED
@@ -62,22 +62,13 @@ class WC_Tools_Subscriptions_Status_Button {
62
  // Loop through all subscriptions
63
  foreach ( $subscriptions as $subscription ) {
64
 
65
- // Get all data in the correct way for WooCommerce 3.x or lower
66
- if ( version_compare( mollieWooCommerceWcVersion(), '3.0', '<' ) ) {
67
- $subscription_is_manual = get_post_meta( $subscription->id, '_requires_manual_renewal', true );
68
- $subscription_status = $subscription->status;
69
 
70
- $mollie_customer_id = get_post_meta( $subscription->id, '_mollie_customer_id', true );
71
- $subscription_id = $subscription->id;
72
- } else {
73
- $subscription = new WC_Subscription( $subscription->ID );
74
 
75
- $subscription_is_manual = $subscription->is_manual();
76
- $subscription_status = $subscription->get_status();
77
-
78
- $mollie_customer_id = $subscription->get_meta( '_mollie_customer_id' );
79
- $subscription_id = $subscription->get_id();
80
- }
81
 
82
  // Only continue if the subscription is set to require manual renewal and status is On-Hold
83
  if ( ( $subscription_is_manual ) && ( $subscription_status == 'on-hold' ) ) {
62
  // Loop through all subscriptions
63
  foreach ( $subscriptions as $subscription ) {
64
 
65
+ $subscription = new WC_Subscription( $subscription->ID );
 
 
 
66
 
67
+ $subscription_is_manual = $subscription->is_manual();
68
+ $subscription_status = $subscription->get_status();
 
 
69
 
70
+ $mollie_customer_id = $subscription->get_meta( '_mollie_customer_id' );
71
+ $subscription_id = $subscription->get_id();
 
 
 
 
72
 
73
  // Only continue if the subscription is set to require manual renewal and status is On-Hold
74
  if ( ( $subscription_is_manual ) && ( $subscription_status == 'on-hold' ) ) {
vendor/mollie/mollie-api-php/vendor/symfony/polyfill-intl-idn/bootstrap.php CHANGED
@@ -14,7 +14,6 @@ use _PhpScoper3234cdc49fbb\Symfony\Polyfill\Intl\Idn as p;
14
  if (\extension_loaded('intl')) {
15
  return;
16
  }
17
-
18
  if (!\defined('U_IDNA_PROHIBITED_ERROR')) {
19
  \define('U_IDNA_PROHIBITED_ERROR', 66560);
20
  }
14
  if (\extension_loaded('intl')) {
15
  return;
16
  }
 
17
  if (!\defined('U_IDNA_PROHIBITED_ERROR')) {
18
  \define('U_IDNA_PROHIBITED_ERROR', 66560);
19
  }
vendor/mollie/mollie-api-php/vendor/symfony/polyfill-intl-normalizer/Normalizer.php CHANGED
@@ -22,19 +22,19 @@ namespace _PhpScoper3234cdc49fbb\Symfony\Polyfill\Intl\Normalizer;
22
  */
23
  class Normalizer
24
  {
25
- public const FORM_D = \Normalizer::FORM_D;
26
- public const FORM_KD = \Normalizer::FORM_KD;
27
- public const FORM_C = \Normalizer::FORM_C;
28
- public const FORM_KC = \Normalizer::FORM_KC;
29
- public const NFD = \Normalizer::NFD;
30
- public const NFKD = \Normalizer::NFKD;
31
- public const NFC = \Normalizer::NFC;
32
- public const NFKC = \Normalizer::NFKC;
33
  private static $C;
34
  private static $D;
35
  private static $KD;
36
  private static $cC;
37
- private static $ulenMask = ["�" => 2, "�" => 2, "�" => 3, "�" => 4];
38
  private static $ASCII = " eiasntrolud][cmp'\ng|hv.fb,:=-q10C2*yx)(L9AS/P\"EjMIk3>5T<D4}B{8FwR67UGN;JzV#HOW_&!K?XQ%Y\\\tZ+~^\$@`\0\1\2\3\4\5\6\7\10\v\f\r\16\17\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36\37";
39
  public static function isNormalized(string $s, int $form = self::FORM_C)
40
  {
@@ -49,7 +49,7 @@ class Normalizer
49
  }
50
  return self::normalize($s, $form) === $s;
51
  }
52
- public static function normalize(string $s, int $form = self::FORM_C)
53
  {
54
  if (!\preg_match('//u', $s)) {
55
  return \false;
@@ -112,12 +112,12 @@ class Normalizer
112
  $combClass = self::$cC;
113
  $ulenMask = self::$ulenMask;
114
  $result = $tail = '';
115
- $i = $s[0] < "�" ? 1 : $ulenMask[$s[0] & "�"];
116
  $len = \strlen($s);
117
  $lastUchr = \substr($s, 0, $i);
118
  $lastUcls = isset($combClass[$lastUchr]) ? 256 : 0;
119
  while ($i < $len) {
120
- if ($s[$i] < "�") {
121
  // ASCII chars
122
  if ($tail) {
123
  $lastUchr .= $tail;
@@ -133,7 +133,7 @@ class Normalizer
133
  ++$i;
134
  continue;
135
  }
136
- $ulen = $ulenMask[$s[$i] & "�"];
137
  $uchr = \substr($s, $i, $ulen);
138
  if ($lastUchr < "ᄀ" || "ᄒ" < $lastUchr || $uchr < "ᅡ" || "ᅵ" < $uchr || $lastUcls) {
139
  // Table lookup and combining chars composition
@@ -182,7 +182,7 @@ class Normalizer
182
  $i = 0;
183
  $len = \strlen($s);
184
  while ($i < $len) {
185
- if ($s[$i] < "�") {
186
  // ASCII chars
187
  if ($c) {
188
  \ksort($c);
@@ -194,7 +194,7 @@ class Normalizer
194
  $i += $j;
195
  continue;
196
  }
197
- $ulen = $ulenMask[$s[$i] & "�"];
198
  $uchr = \substr($s, $i, $ulen);
199
  $i += $ulen;
200
  if ($uchr < "가" || "힣" < $uchr) {
@@ -202,7 +202,7 @@ class Normalizer
202
  if ($uchr !== ($j = $compatMap[$uchr] ?? $decompMap[$uchr] ?? $uchr)) {
203
  $uchr = $j;
204
  $j = \strlen($uchr);
205
- $ulen = $uchr[0] < "�" ? 1 : $ulenMask[$uchr[0] & "�"];
206
  if ($ulen != $j) {
207
  // Put trailing chars in $s
208
  $j -= $ulen;
@@ -230,9 +230,9 @@ class Normalizer
230
  // Hangul chars
231
  $uchr = \unpack('C*', $uchr);
232
  $j = ($uchr[1] - 224 << 12) + ($uchr[2] - 128 << 6) + $uchr[3] - 0xac80;
233
- $uchr = "�" . \chr(0x80 + (int) ($j / 588)) . "�" . \chr(0xa1 + (int) ($j % 588 / 28));
234
  if ($j %= 28) {
235
- $uchr .= $j < 25 ? "�" . \chr(0xa7 + $j) : "�" . \chr(0x67 + $j);
236
  }
237
  }
238
  if ($c) {
22
  */
23
  class Normalizer
24
  {
25
+ const FORM_D = \Normalizer::FORM_D;
26
+ const FORM_KD = \Normalizer::FORM_KD;
27
+ const FORM_C = \Normalizer::FORM_C;
28
+ const FORM_KC = \Normalizer::FORM_KC;
29
+ const NFD = \Normalizer::NFD;
30
+ const NFKD = \Normalizer::NFKD;
31
+ const NFC = \Normalizer::NFC;
32
+ const NFKC = \Normalizer::NFKC;
33
  private static $C;
34
  private static $D;
35
  private static $KD;
36
  private static $cC;
37
+ private static $ulenMask = ["�" => 2, "�" => 2, "�" => 3, "�" => 4];
38
  private static $ASCII = " eiasntrolud][cmp'\ng|hv.fb,:=-q10C2*yx)(L9AS/P\"EjMIk3>5T<D4}B{8FwR67UGN;JzV#HOW_&!K?XQ%Y\\\tZ+~^\$@`\0\1\2\3\4\5\6\7\10\v\f\r\16\17\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36\37";
39
  public static function isNormalized(string $s, int $form = self::FORM_C)
40
  {
49
  }
50
  return self::normalize($s, $form) === $s;
51
  }
52
+ public static function normalize($s, $form = self::FORM_C)
53
  {
54
  if (!\preg_match('//u', $s)) {
55
  return \false;
112
  $combClass = self::$cC;
113
  $ulenMask = self::$ulenMask;
114
  $result = $tail = '';
115
+ $i = $s[0] < "�" ? 1 : $ulenMask[$s[0] & "�"];
116
  $len = \strlen($s);
117
  $lastUchr = \substr($s, 0, $i);
118
  $lastUcls = isset($combClass[$lastUchr]) ? 256 : 0;
119
  while ($i < $len) {
120
+ if ($s[$i] < "�") {
121
  // ASCII chars
122
  if ($tail) {
123
  $lastUchr .= $tail;
133
  ++$i;
134
  continue;
135
  }
136
+ $ulen = $ulenMask[$s[$i] & "�"];
137
  $uchr = \substr($s, $i, $ulen);
138
  if ($lastUchr < "ᄀ" || "ᄒ" < $lastUchr || $uchr < "ᅡ" || "ᅵ" < $uchr || $lastUcls) {
139
  // Table lookup and combining chars composition
182
  $i = 0;
183
  $len = \strlen($s);
184
  while ($i < $len) {
185
+ if ($s[$i] < "�") {
186
  // ASCII chars
187
  if ($c) {
188
  \ksort($c);
194
  $i += $j;
195
  continue;
196
  }
197
+ $ulen = $ulenMask[$s[$i] & "�"];
198
  $uchr = \substr($s, $i, $ulen);
199
  $i += $ulen;
200
  if ($uchr < "가" || "힣" < $uchr) {
202
  if ($uchr !== ($j = $compatMap[$uchr] ?? $decompMap[$uchr] ?? $uchr)) {
203
  $uchr = $j;
204
  $j = \strlen($uchr);
205
+ $ulen = $uchr[0] < "�" ? 1 : $ulenMask[$uchr[0] & "�"];
206
  if ($ulen != $j) {
207
  // Put trailing chars in $s
208
  $j -= $ulen;
230
  // Hangul chars
231
  $uchr = \unpack('C*', $uchr);
232
  $j = ($uchr[1] - 224 << 12) + ($uchr[2] - 128 << 6) + $uchr[3] - 0xac80;
233
+ $uchr = "�" . \chr(0x80 + (int) ($j / 588)) . "�" . \chr(0xa1 + (int) ($j % 588 / 28));
234
  if ($j %= 28) {
235
+ $uchr .= $j < 25 ? "�" . \chr(0xa7 + $j) : "�" . \chr(0x67 + $j);
236
  }
237
  }
238
  if ($c) {