Version Description
- 21/06/2018 =
IMPORTANT Starting with version 4.0, this plugin will require PHP 5.6. If you are using an older version, please read this article: PHP & Mollie API v2. We expect to launch version 4.0 in June 2018.
- Fix - Remove a remove_action() call that blocked the plugin from running on PHP versions below PHP 5.6
- Fix - Added more log messages to onWebhookPaid
Download this release
Release Info
| Developer | davdebcom |
| Plugin | |
| Version | 3.0.6 |
| Comparing to | |
| See all releases | |
Code changes from version 3.0.5 to 3.0.6
includes/mollie/wc/gateway/abstract.php
CHANGED
|
@@ -850,14 +850,14 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
|
|
| 850 |
*/
|
| 851 |
protected function onWebhookPaid( WC_Order $order, Mollie_API_Object_Payment $payment ) {
|
| 852 |
|
| 853 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 854 |
|
| 855 |
-
|
| 856 |
-
if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
|
| 857 |
-
$order_id = $order->id;
|
| 858 |
-
} else {
|
| 859 |
-
$order_id = $order->get_id();
|
| 860 |
-
}
|
| 861 |
|
| 862 |
// Add messages to log
|
| 863 |
Mollie_WC_Plugin::debug( __METHOD__ . ' called for order ' . $order_id );
|
|
@@ -871,6 +871,9 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
|
|
| 871 |
$order->payment_complete();
|
| 872 |
}
|
| 873 |
|
|
|
|
|
|
|
|
|
|
| 874 |
$paymentMethodTitle = $this->getPaymentMethodTitle( $payment );
|
| 875 |
$order->add_order_note( sprintf(
|
| 876 |
/* translators: Placeholder 1: payment method title, placeholder 2: payment ID */
|
|
@@ -885,6 +888,14 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
|
|
| 885 |
// Remove (old) cancelled payments from this order
|
| 886 |
Mollie_WC_Plugin::getDataHelper()->unsetCancelledMolliePaymentId( $order_id );
|
| 887 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 888 |
}
|
| 889 |
}
|
| 890 |
|
|
@@ -1424,14 +1435,14 @@ abstract class Mollie_WC_Gateway_Abstract extends WC_Payment_Gateway
|
|
| 1424 |
|
| 1425 |
// Check whether the order is processed and paid via another gateway
|
| 1426 |
if ( $this->isOrderPaidByOtherGateway( $order ) ) {
|
| 1427 |
-
Mollie_WC_Plugin::debug( $this->id . ': Order ' . $order_id . ' orderNeedsPayment
|
| 1428 |
|
| 1429 |
return false;
|
| 1430 |
}
|
| 1431 |
|
| 1432 |
// Check whether the order is processed and paid via Mollie
|
| 1433 |
if ( ! $this->isOrderPaidAndProcessed( $order ) ) {
|
| 1434 |
-
Mollie_WC_Plugin::debug( $this->id . ': Order ' . $order_id . ' orderNeedsPayment check
|
| 1435 |
|
| 1436 |
return true;
|
| 1437 |
}
|
| 850 |
*/
|
| 851 |
protected function onWebhookPaid( WC_Order $order, Mollie_API_Object_Payment $payment ) {
|
| 852 |
|
| 853 |
+
// Get order ID in the correct way depending on WooCommerce version
|
| 854 |
+
if ( version_compare( WC_VERSION, '3.0', '<' ) ) {
|
| 855 |
+
$order_id = $order->id;
|
| 856 |
+
} else {
|
| 857 |
+
$order_id = $order->get_id();
|
| 858 |
+
}
|
| 859 |
|
| 860 |
+
if ( $payment->isPaid() ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 861 |
|
| 862 |
// Add messages to log
|
| 863 |
Mollie_WC_Plugin::debug( __METHOD__ . ' called for order ' . $order_id );
|
| 871 |
$order->payment_complete();
|
| 872 |
}
|
| 873 |
|
| 874 |
+
// Add messages to log
|
| 875 |
+
Mollie_WC_Plugin::debug( __METHOD__ . ' WooCommerce payment_complete() processed and returned to onWebHookPaid for order ' . $order_id );
|
| 876 |
+
|
| 877 |
$paymentMethodTitle = $this->getPaymentMethodTitle( $payment );
|
| 878 |
$order->add_order_note( sprintf(
|
| 879 |
/* translators: Placeholder 1: payment method title, placeholder 2: payment ID */
|
| 888 |
// Remove (old) cancelled payments from this order
|
| 889 |
Mollie_WC_Plugin::getDataHelper()->unsetCancelledMolliePaymentId( $order_id );
|
| 890 |
|
| 891 |
+
// Add messages to log
|
| 892 |
+
Mollie_WC_Plugin::debug( __METHOD__ . ' processing paid order via Mollie plugin fully completed for order ' . $order_id );
|
| 893 |
+
|
| 894 |
+
} else {
|
| 895 |
+
|
| 896 |
+
// Add messages to log
|
| 897 |
+
Mollie_WC_Plugin::debug( __METHOD__ . ' payment at Mollie not paid, so no processing for order ' . $order_id );
|
| 898 |
+
|
| 899 |
}
|
| 900 |
}
|
| 901 |
|
| 1435 |
|
| 1436 |
// Check whether the order is processed and paid via another gateway
|
| 1437 |
if ( $this->isOrderPaidByOtherGateway( $order ) ) {
|
| 1438 |
+
Mollie_WC_Plugin::debug( $this->id . ': Order ' . $order_id . ' orderNeedsPayment check: no, processed by other (non-Mollie) gateway.', true );
|
| 1439 |
|
| 1440 |
return false;
|
| 1441 |
}
|
| 1442 |
|
| 1443 |
// Check whether the order is processed and paid via Mollie
|
| 1444 |
if ( ! $this->isOrderPaidAndProcessed( $order ) ) {
|
| 1445 |
+
Mollie_WC_Plugin::debug( $this->id . ': Order ' . $order_id . ' orderNeedsPayment check: yes, not processed by Mollie gateway.', true );
|
| 1446 |
|
| 1447 |
return true;
|
| 1448 |
}
|
includes/mollie/wc/plugin.php
CHANGED
|
@@ -7,7 +7,7 @@ class Mollie_WC_Plugin
|
|
| 7 |
{
|
| 8 |
const PLUGIN_ID = 'mollie-payments-for-woocommerce';
|
| 9 |
const PLUGIN_TITLE = 'Mollie Payments for WooCommerce';
|
| 10 |
-
const PLUGIN_VERSION = '3.0.
|
| 11 |
|
| 12 |
const DB_VERSION = '1.0';
|
| 13 |
const DB_VERSION_PARAM_NAME = 'mollie-db-version';
|
| 7 |
{
|
| 8 |
const PLUGIN_ID = 'mollie-payments-for-woocommerce';
|
| 9 |
const PLUGIN_TITLE = 'Mollie Payments for WooCommerce';
|
| 10 |
+
const PLUGIN_VERSION = '3.0.6';
|
| 11 |
|
| 12 |
const DB_VERSION = '1.0';
|
| 13 |
const DB_VERSION_PARAM_NAME = 'mollie-db-version';
|
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: 3.0.
|
| 7 |
* Author: Mollie
|
| 8 |
* Author URI: https://www.mollie.com
|
| 9 |
* Requires at least: 3.8
|
|
@@ -41,7 +41,6 @@ if ( ! defined( 'M4W_PLUGIN_DIR' ) ) {
|
|
| 41 |
*/
|
| 42 |
function mollie_wc_check_php_version() {
|
| 43 |
if ( ! version_compare( PHP_VERSION, '5.6.0', ">=" ) ) {
|
| 44 |
-
remove_action( 'init', 'mollie_wc_plugin_init' );
|
| 45 |
add_action( 'admin_notices', 'mollie_wc_plugin_inactive_php' );
|
| 46 |
return;
|
| 47 |
}
|
| 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: 3.0.6
|
| 7 |
* Author: Mollie
|
| 8 |
* Author URI: https://www.mollie.com
|
| 9 |
* Requires at least: 3.8
|
| 41 |
*/
|
| 42 |
function mollie_wc_check_php_version() {
|
| 43 |
if ( ! version_compare( PHP_VERSION, '5.6.0', ">=" ) ) {
|
|
|
|
| 44 |
add_action( 'admin_notices', 'mollie_wc_plugin_inactive_php' );
|
| 45 |
return;
|
| 46 |
}
|
readme.txt
CHANGED
|
@@ -3,7 +3,7 @@ Contributors: daanvm, davdebcom, l.vangunst, ndijkstra, robin-mollie
|
|
| 3 |
Tags: mollie, payments, woocommerce, payment gateway, e-commerce, credit card, ideal, sofort, bancontact, bitcoin, direct debit, subscriptions
|
| 4 |
Requires at least: 3.8
|
| 5 |
Tested up to: 4.9
|
| 6 |
-
Stable tag: 3.0.
|
| 7 |
Requires PHP: 5.6
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
|
@@ -163,6 +163,14 @@ Automatic updates should work like a charm; as always though, ensure you backup
|
|
| 163 |
|
| 164 |
== Changelog ==
|
| 165 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 166 |
= 3.0.5 - 18/06/2018 =
|
| 167 |
|
| 168 |
IMPORTANT
|
| 3 |
Tags: mollie, payments, woocommerce, payment gateway, e-commerce, credit card, ideal, sofort, bancontact, bitcoin, direct debit, subscriptions
|
| 4 |
Requires at least: 3.8
|
| 5 |
Tested up to: 4.9
|
| 6 |
+
Stable tag: 3.0.6
|
| 7 |
Requires PHP: 5.6
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 163 |
|
| 164 |
== Changelog ==
|
| 165 |
|
| 166 |
+
= 3.0.6 - 21/06/2018 =
|
| 167 |
+
|
| 168 |
+
IMPORTANT
|
| 169 |
+
Starting with version 4.0, this plugin will require PHP 5.6. If you are using an older version, please read this article: [PHP & Mollie API v2](https://github.com/mollie/WooCommerce/wiki/PHP-&-Mollie-API-v2). We expect to launch version 4.0 in June 2018.
|
| 170 |
+
|
| 171 |
+
* Fix - Remove a remove_action() call that blocked the plugin from running on PHP versions below PHP 5.6
|
| 172 |
+
* Fix - Added more log messages to onWebhookPaid
|
| 173 |
+
|
| 174 |
= 3.0.5 - 18/06/2018 =
|
| 175 |
|
| 176 |
IMPORTANT
|
