Skip to content

Commit e472e34

Browse files
committed
Translations should be loaded at the init action or later
1 parent bbec85b commit e472e34

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

pdf-forms-for-wpforms.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public static function get_instance()
6464
*/
6565
public function plugin_init()
6666
{
67-
load_plugin_textdomain( 'pdf-forms-for-wpforms', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
67+
add_action( 'init', array( $this, 'load_textdomain' ) );
6868

6969
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
7070

@@ -96,6 +96,14 @@ public function plugin_init()
9696
}
9797
}
9898

99+
/*
100+
* Loads plugin textdomain
101+
*/
102+
public function load_textdomain()
103+
{
104+
load_plugin_textdomain( 'pdf-forms-for-wpforms', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
105+
}
106+
99107
/*
100108
* Runs after the plugin have been activated/deactivated
101109
*/

0 commit comments

Comments
 (0)