[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-gnu-taler-payment-for-woocommerce] branch master updated: -improv
From: |
gnunet |
Subject: |
[taler-gnu-taler-payment-for-woocommerce] branch master updated: -improve version checking |
Date: |
Thu, 23 Feb 2023 15:02:32 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnu-taler-payment-for-woocommerce.
The following commit(s) were added to refs/heads/master by this push:
new 8098010 -improve version checking
8098010 is described below
commit 8098010209fe4f589781eb9b9e117750ffba63b1
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Thu Feb 23 15:02:29 2023 +0100
-improve version checking
---
class-wc-gnutaler-gateway.php | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/class-wc-gnutaler-gateway.php b/class-wc-gnutaler-gateway.php
index 940cc1a..1305479 100644
--- a/class-wc-gnutaler-gateway.php
+++ b/class-wc-gnutaler-gateway.php
@@ -42,7 +42,7 @@ define( 'GNU_TALER_MERCHANT_PROTOCOL_CURRENT', 3 );
/**
* How many merchant protocol versions are we backwards compatible with?
*/
-define( 'GNU_TALER_MERCHANT_PROTOCOL_AGE', 2 );
+define( 'GNU_TALER_MERCHANT_PROTOCOL_AGE', 0 );
require_once ABSPATH . 'wp-admin/includes/plugin.php';
@@ -549,7 +549,8 @@ function gnutaler_init_gateway_class() {
$age = $ver[2];
if ( ( ! is_numeric( $current ) )
|| ( ! is_numeric( $revision )
)
- || ( ! is_numeric( $age ) )
+ || ( ! is_numeric( $age )
+ || ( $age > $current ) )
) {
$this->error(
sprintf(
@@ -583,7 +584,8 @@ function gnutaler_init_gateway_class() {
return false;
}
$currency = $info['currency'];
- if ( ( ! is_null( $ecurrency ) ) && ( 0
!== strcasecmp( $currency, $ecurrency ) ) ) {
+ if ( ( ! is_null( $ecurrency ) ) &&
+ ( 0 !== strcasecmp( $currency,
$ecurrency ) ) ) {
$this->error(
sprintf(
/* translators:
first placeholder is the Taler backend currency, second the expected currency
from WooCommerce */
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-gnu-taler-payment-for-woocommerce] branch master updated: -improve version checking,
gnunet <=