Skip to content

Commit 773cd21

Browse files
author
Benjamin Pick
committed
Defer textdomain loading after init
1 parent 648c05e commit 773cd21

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

init.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function geoip_detect_check_ipv6_support() {
4040
function geoip_detect_load_textdomain() {
4141
load_plugin_textdomain( 'geoip-detect', false, GEOIP_PLUGIN_DIR . '/languages' );
4242
}
43-
add_action( 'plugins_loaded', 'geoip_detect_load_textdomain' );
43+
add_action( 'init', 'geoip_detect_load_textdomain' );
4444

4545

4646
function geoip_detect_enqueue_admin_notices() {

lib/logger.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,6 @@ public static function reset_last_error_msg($category = '') {
6969

7070

7171
}
72-
Logger::init();
72+
add_action('init', function () {
73+
Logger::init();
74+
});

0 commit comments

Comments
 (0)