Skip to content

Commit ab8f7c1

Browse files
committed
if an option cannot be found in the multisite WP option, default to the value found through Piwik\\Config
1 parent 9c242a7 commit ab8f7c1

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

classes/WpMatomo/Site/Sync/SyncConfig.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,16 @@ public function get_config_value( $group, $key ) {
8686
if ( isset( $config[ $group ][ $key ] ) ) {
8787
return $config[ $group ][ $key ];
8888
}
89-
} else {
90-
Bootstrap::do_bootstrap();
91-
$config = PiwikConfig::getInstance();
92-
$the_group = $config->{$group};
93-
if ( ! empty( $the_group ) && isset( $the_group[ $key ] ) ) {
94-
return $the_group[ $key ];
95-
}
9689
}
90+
91+
Bootstrap::do_bootstrap();
92+
$config = PiwikConfig::getInstance();
93+
$the_group = $config->{$group};
94+
if ( ! empty( $the_group ) && isset( $the_group[ $key ] ) ) {
95+
return $the_group[ $key ];
96+
}
97+
98+
return null;
9799
}
98100

99101
public function set_config_value( $group, $key, $value ) {

0 commit comments

Comments
 (0)