← All changes
|
includes/admin/settings/integration/google-integration.php
+3
-1
1.7.9
→
2.3.0
View file →
| @@ -89,9 +89,11 @@ | ||
| 89 | 89 | if ( empty( $google_events ) ) { |
| 90 | 90 | return; |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | - $sellkit_page_meta = $post_meta[0]['type']['key']; | |
| 93 | + $first_index = array_key_first( $post_meta ); | |
| 94 | + | |
| 95 | + $sellkit_page_meta = $post_meta[ $first_index ]['type']['key']; | |
| 94 | 96 | $google_events_script = ''; |
| 95 | 97 | |
| 96 | 98 | foreach ( $google_events as $event ) { |
| 97 | 99 | $function_name = "google_analytics_{$event}"; |