File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ public static function install()
8282 // attempt to overwrite file with latest contents to ensure it's up-to-date
8383 file_put_contents (self ::get_file_name (), self ::get_file_contents ());
8484
85- return self ::test ();
85+ return self ::test (true );
8686 }
8787
8888 public static function uninstall (): void
@@ -98,8 +98,13 @@ public static function uninstall(): void
9898 /**
9999 * @return string|bool
100100 */
101- public static function test ()
101+ public static function test ($ force_test = false )
102102 {
103+ // No need to test if not using it
104+ if (!$ force_test && ! get_option ('koko_analytics_use_custom_endpoint ' )) {
105+ return ;
106+ }
107+
103108 // Check if file exists
104109 // Note that we're not checking whether we were able to write to the file
105110 // To allow for users manually creating the file with the correct contents
You can’t perform that action at this time.
0 commit comments