Skip to content

Commit bdb5036

Browse files
committed
👌 IMPROVE: Updated plugin to load text domains for translations
1 parent d05d138 commit bdb5036

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

benchpress.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,21 @@ function benchpress_settings_link( $links ) {
7777

7878
new WPComPluginHandler( plugin_basename( __FILE__ ), 'https://robertdevore.com/why-this-plugin-doesnt-support-wordpress-com-hosting/' );
7979

80+
/**
81+
* Load plugin text domain for translations
82+
*
83+
* @since 1.2.0
84+
* @return void
85+
*/
86+
function benchpress_load_textdomain() {
87+
load_plugin_textdomain(
88+
'customer-loyalty-for-woocommerce',
89+
false,
90+
dirname( plugin_basename( __FILE__ ) ) . '/languages/'
91+
);
92+
}
93+
add_action( 'plugins_loaded', 'benchpress_load_textdomain' );
94+
8095
/**
8196
* Summary of benchpress_create_snapshots_table
8297
*

0 commit comments

Comments
 (0)