diff --git a/plugins/otter-pro/inc/class-main.php b/plugins/otter-pro/inc/class-main.php index 2d09d9137..664c5793d 100644 --- a/plugins/otter-pro/inc/class-main.php +++ b/plugins/otter-pro/inc/class-main.php @@ -221,6 +221,8 @@ public function enqueue_block_editor_assets() { $asset_file['version'], true ); + + wp_set_script_translations( 'otter-blocks-woocommerce', 'otter-pro' ); } } @@ -243,6 +245,8 @@ public function enqueue_options_assets() { $asset_file['version'], true ); + + wp_set_script_translations( 'otter-dashboard-scripts', 'otter-pro' ); } /** diff --git a/plugins/otter-pro/inc/plugins/class-live-search.php b/plugins/otter-pro/inc/plugins/class-live-search.php index 484f3a78d..c24593e4f 100644 --- a/plugins/otter-pro/inc/plugins/class-live-search.php +++ b/plugins/otter-pro/inc/plugins/class-live-search.php @@ -90,6 +90,7 @@ public static function load_deps() { $asset_file['version'], true ); + wp_localize_script( 'otter-live-search', 'liveSearchData', @@ -105,6 +106,8 @@ public static function load_deps() { ) ); + wp_set_script_translations( 'otter-live-search', 'otter-pro' ); + $asset_file = include OTTER_BLOCKS_PATH . '/build/blocks/live-search-style.asset.php'; wp_enqueue_style( 'otter-live-search-style', OTTER_BLOCKS_URL . 'build/blocks/live-search-style.css', $asset_file['dependencies'], $asset_file['version'] ); } diff --git a/plugins/otter-pro/inc/plugins/class-woocommerce-builder.php b/plugins/otter-pro/inc/plugins/class-woocommerce-builder.php index 10979450a..357e2e7ff 100644 --- a/plugins/otter-pro/inc/plugins/class-woocommerce-builder.php +++ b/plugins/otter-pro/inc/plugins/class-woocommerce-builder.php @@ -150,6 +150,8 @@ public function wc_get_template_part( $template, $slug, $name ) { if ( has_block( 'themeisle-blocks/product-image', get_the_ID() ) ) { wp_enqueue_script( 'wc-single-product' ); + + wp_set_script_translations( 'wc-single-product', 'otter-pro' ); } if ( class_exists( '\Neve\Views\Product_Layout' ) && class_exists( '\Neve_Pro\Modules\Woocommerce_Booster\Views\Single_Product' ) ) {