Skip to content

Commit 3183e2b

Browse files
committed
Fixed: Translation loading for the plausible-analytics domain was triggered too early.
1 parent 999eab3 commit 3183e2b

File tree

1 file changed

+31
-4
lines changed

1 file changed

+31
-4
lines changed

src/Plugin.php

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,16 @@ public function register_services() {
4545

4646
if ( is_admin() ) {
4747
add_action( 'init', [ $this, 'load_settings' ] );
48-
48+
add_action( 'init', [ $this, 'load_provisioning' ] );
49+
add_action( 'init', [ $this, 'load_integrations_provisioning' ] );
50+
4951
new Admin\Upgrades();
5052
new Admin\Filters();
5153
new Admin\Actions();
5254
new Admin\Module();
53-
new Admin\Provisioning();
54-
new Admin\Provisioning\Integrations();
5555
}
5656

57-
new Integrations();
57+
add_action( 'init', [ $this, 'load_integrations' ] );
5858
new Actions();
5959
new Ajax();
6060
new Compatibility();
@@ -66,6 +66,33 @@ public function load_settings() {
6666
new Admin\Settings\Page();
6767
}
6868

69+
/**
70+
* Load @see Admin\Provisioning()
71+
*
72+
* @return void
73+
*/
74+
public function load_provisioning() {
75+
new Admin\Provisioning();
76+
}
77+
78+
/**
79+
* Load @see Admin\Provisioning\Integrations()
80+
*
81+
* @return void
82+
*/
83+
public function load_integrations_provisioning() {
84+
new Admin\Provisioning\Integrations();
85+
}
86+
87+
/**
88+
* Load @see Integrations()
89+
*
90+
* @return void
91+
*/
92+
public function load_integrations() {
93+
new Integrations();
94+
}
95+
6996
/**
7097
* Loads the plugin's translated strings.
7198
*

0 commit comments

Comments
 (0)