From 094ec7a1e091cff003da5eda46205a4552e6346a Mon Sep 17 00:00:00 2001 From: renepickhardt Date: Sat, 27 Jan 2018 17:06:55 +0100 Subject: [PATCH 1/3] Update woocommerce-gateway-lightning.php made the error message if php-curl or php-gd are missing more explicit for inexperienced users --- woocommerce-gateway-lightning.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/woocommerce-gateway-lightning.php b/woocommerce-gateway-lightning.php index a7681cc..d6fe8bd 100755 --- a/woocommerce-gateway-lightning.php +++ b/woocommerce-gateway-lightning.php @@ -15,8 +15,14 @@ } register_activation_hook( __FILE__, function(){ - if (!extension_loaded('gd') || !extension_loaded('curl')) { - die('The php-curl and php-gd extensions are required.'); + if (!extension_loaded('gd') && !extension_loaded('curl')) { + die('The php-curl and php-gd extensions of your apache web server are required. If you are running this wordpress on a managed hosting service you might have to switch to virtual machine or a dedicated server.'); + } + else if (!extension_loaded('gd')) { + die('The php-gd extensions of your apache web server are required. If you are running this wordpress on a managed hosting service you might have to switch to virtual machine or a dedicated server.'); + } + else if (!extension_loaded('curl')) { + die('The php-curl extensions of your apache web server are required. If you are running this wordpress on a managed hosting service you might have to switch to virtual machine or a dedicated server.'); } }); From 6014cef5b1a3f8330118fa61c74ee140f2f57202 Mon Sep 17 00:00:00 2001 From: renepickhardt Date: Sat, 27 Jan 2018 21:11:56 +0100 Subject: [PATCH 2/3] Update woocommerce-gateway-lightning.php removed the case distinction about which plugin is missing. however I think the note for people running the plugin in managed hosting settings is still usefull --- woocommerce-gateway-lightning.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/woocommerce-gateway-lightning.php b/woocommerce-gateway-lightning.php index d6fe8bd..fd381c2 100755 --- a/woocommerce-gateway-lightning.php +++ b/woocommerce-gateway-lightning.php @@ -15,15 +15,9 @@ } register_activation_hook( __FILE__, function(){ - if (!extension_loaded('gd') && !extension_loaded('curl')) { + if (!extension_loaded('gd') || !extension_loaded('curl')) { die('The php-curl and php-gd extensions of your apache web server are required. If you are running this wordpress on a managed hosting service you might have to switch to virtual machine or a dedicated server.'); } - else if (!extension_loaded('gd')) { - die('The php-gd extensions of your apache web server are required. If you are running this wordpress on a managed hosting service you might have to switch to virtual machine or a dedicated server.'); - } - else if (!extension_loaded('curl')) { - die('The php-curl extensions of your apache web server are required. If you are running this wordpress on a managed hosting service you might have to switch to virtual machine or a dedicated server.'); - } }); require_once 'vendor/autoload.php'; From 5a42ef2e80fd1fc9c3ce050cea7788a2becdf12d Mon Sep 17 00:00:00 2001 From: renepickhardt Date: Sun, 28 Jan 2018 00:34:40 +0100 Subject: [PATCH 3/3] Update woocommerce-gateway-lightning.php made the error message more general --- woocommerce-gateway-lightning.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/woocommerce-gateway-lightning.php b/woocommerce-gateway-lightning.php index fd381c2..2657de2 100755 --- a/woocommerce-gateway-lightning.php +++ b/woocommerce-gateway-lightning.php @@ -16,7 +16,7 @@ register_activation_hook( __FILE__, function(){ if (!extension_loaded('gd') || !extension_loaded('curl')) { - die('The php-curl and php-gd extensions of your apache web server are required. If you are running this wordpress on a managed hosting service you might have to switch to virtual machine or a dedicated server.'); + die('The php-curl and php-gd extensions of your web server are required. If you are running this site on a managed hosting service you might have to contact your service provider for additional help.'); } });