跳到内容 跳到侧边栏

本主题包含 0 則回覆 ,有 0 声音 。

最后由 josephN-9 3 months, 2 weeks前 更新。

协助者:: Christopher Amirian.

作者 帖子
17 8 月, 2025 于 8:09 上午 #17325243

josephN-9

Background of the issue:
I need to translate newly added WooCommerce 'My Account' menu items. I have added these menu items to my account page of WooCommerce using the following code: add_filter('woocommerce_account_menu_items', function($items) { $new_items = []; foreach ($items as $key => $label) { $new_items[$key] = $label; if ($key === 'dashboard') { $new_items['submit-press'] = __('Submit Press Release', 'your-text-domain'); $new_items['your-releases'] = __('Your Releases', 'your-text-domain'); } } return $new_items; }); add_action('init', function () { add_rewrite_endpoint('submit-press', EP_ROOT | EP_PAGES); add_rewrite_endpoint('your-releases', EP_ROOT | EP_PAGES); }); I used _() text domain. Link to a page where the issue can be seen: 隐藏链接

Symptoms:
I cannot find the items from String translation.

Questions:
How can I make the newly added WooCommerce 'My Account' menu items appear in String translation?