File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ class Actions {
1616 * @return void
1717 */
1818 public function __construct () {
19- add_action ( 'wp_head ' , [ $ this , 'insert_version_meta_tag ' ] );
19+ add_action ( 'wp_head ' , [ $ this , 'maybe_insert_version_meta_tag ' ] );
2020 add_action ( 'wp_enqueue_scripts ' , [ $ this , 'maybe_register_assets ' ] );
2121 add_action ( 'admin_bar_menu ' , [ $ this , 'admin_bar_node ' ], 100 );
2222 }
@@ -27,10 +27,11 @@ public function __construct() {
2727 *
2828 * @return void
2929 */
30- public function insert_version_meta_tag () {
31- $ version = $ this ->get_plugin_version ();
30+ public function maybe_insert_version_meta_tag () {
31+ $ version = $ this ->get_plugin_version ();
32+ $ running_tests = array_key_exists ( 'plausible_verification ' , $ _GET );
3233
33- if ( $ version ) {
34+ if ( $ version && $ running_tests ) {
3435 echo "<meta name='plausible-analytics-version' content=' $ version' /> \n" ;
3536 }
3637 }
You can’t perform that action at this time.
0 commit comments