From 4b60d7f9ede566414a6442eb7141ef30ebf2d277 Mon Sep 17 00:00:00 2001 From: Frey Mansikkaniemi Date: Fri, 20 Nov 2020 15:55:40 +0800 Subject: [PATCH] Invalid index bug fixed --- hong-kong-fps-woo-payment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hong-kong-fps-woo-payment.php b/hong-kong-fps-woo-payment.php index e4cf423..be017ce 100644 --- a/hong-kong-fps-woo-payment.php +++ b/hong-kong-fps-woo-payment.php @@ -59,7 +59,7 @@ function its_wpf_add_class( $methods ){ add_filter('woocommerce_available_payment_gateways', 'its_wpf_pay_order_label'); function its_wpf_pay_order_label($gateways) { - if($gateways[ITS_WPF_PLUGIN_ID]) { + if(!empty($gateways[ITS_WPF_PLUGIN_ID])) { $gateways[ITS_WPF_PLUGIN_ID]->order_button_text = __('Confirm FPS Payment Completed',ITS_WPF_PLUGIN_ID); } return $gateways;