Skip to content

Commit

Permalink
Ensure every gateway has individual settings object (#8361)
Browse files Browse the repository at this point in the history
Co-authored-by: Timur Karimov <[email protected]>
  • Loading branch information
timur27 and Timur Karimov authored Mar 11, 2024
1 parent 2bca6c8 commit dd07388
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions changelog/fix-gateway-individual-settings
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: fix

Ensure every gateway has individual settings object.
3 changes: 1 addition & 2 deletions includes/class-wc-payment-gateway-wcpay.php
Original file line number Diff line number Diff line change
Expand Up @@ -2399,8 +2399,7 @@ public function get_option( $key, $empty_value = null ) {
* Overrides parent method so the option key is the same as the parent class.
*/
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';
}


Expand Down

0 comments on commit dd07388

Please sign in to comment.