From 2b25747021f7fe4a85030b5899242096f6cc31c2 Mon Sep 17 00:00:00 2001 From: Timur Karimov Date: Fri, 8 Mar 2024 10:30:44 +0100 Subject: [PATCH] ensure every gateway has individual settings object --- changelog/fix-gateway-individual-settings | 4 ++++ includes/class-wc-payment-gateway-wcpay.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelog/fix-gateway-individual-settings diff --git a/changelog/fix-gateway-individual-settings b/changelog/fix-gateway-individual-settings new file mode 100644 index 00000000000..6eb09cd2a3a --- /dev/null +++ b/changelog/fix-gateway-individual-settings @@ -0,0 +1,4 @@ +Significance: minor +Type: fix + +Ensure every gateway has individual settings object. diff --git a/includes/class-wc-payment-gateway-wcpay.php b/includes/class-wc-payment-gateway-wcpay.php index 423d42ba190..b079dc7a0e5 100644 --- a/includes/class-wc-payment-gateway-wcpay.php +++ b/includes/class-wc-payment-gateway-wcpay.php @@ -2400,7 +2400,7 @@ public function get_option( $key, $empty_value = null ) { */ public function get_option_key() { // Intentionally using self instead of static so options are loaded from main gateway settings. - return $this->plugin_id . self::GATEWAY_ID . '_settings'; + return $this->plugin_id . $this->id . '_settings'; }