-improve version checking

master
Christian Grothoff 2023-02-23 15:02:29 +01:00
rodzic a6b36d5cee
commit 8098010209
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 939E6BE1E29FC3CC
1 zmienionych plików z 5 dodań i 3 usunięć

Wyświetl plik

@ -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 */