2016-04-27 1 views
1

мы можем изменить родительский, который говорит «Продукты», и мы меняем это имя на что-то другое, но не на детей.Можно ли изменить текст ссылки меню «Продукты» в WooCommerce на панели администратора Wordpress?

Возможно ли это?

enter image description here

Спасибо большое

+0

Почему вы хотите изменить основные метки WooCommerce? –

+0

Вместо продуктов у нас есть документы – mithrandir

ответ

3

Есть два способа сделать это. Сначала нужно перевести его через предоставленные файлы PO/MO.

Другой способ Вы можете изменить метки на фильтре.

add_filter('woocommerce_register_post_type_product', 'custom_post_type_label_woo'); 

function custom_post_type_label_woo($args){ 
    $labels = array(
     'name'    => __('Elements', 'your-custom-plugin'), 
     'singular_name'  => __('Element', 'your-custom-plugin'), 
     'menu_name'   => _x('Elements', 'Admin menu name', 'your-custom-plugin'), 
     'add_new'   => __('Add Element', 'your-custom-plugin'), 
     'add_new_item'  => __('Add New Tour', 'your-custom-plugin'), 
     'edit'    => __('Edit Element', 'your-custom-plugin'), 
     'edit_item'   => __('Edit Element', 'your-custom-plugin'), 
     'new_item'   => __('New Element', 'your-custom-plugin'), 
     'view'    => __('View Element', 'your-custom-plugin'), 
     'view_item'   => __('View Element', 'your-custom-plugin'), 
     'search_items'  => __('Search Elements', 'your-custom-plugin'), 
     'not_found'   => __('No Elements found', 'your-custom-plugin'), 
     'not_found_in_trash' => __('No Elements found in trash', 'your-custom-plugin'), 
     'parent'    => __('Parent Element', 'your-custom-plugin') 
    ); 

    $args['labels'] = $labels; 
    $args['description'] = __('This is where you can add new tours to your store.', 'your-custom-plugin'); 
    return $args; 
} 
+0

Спасибо человеку !!!!!! – mithrandir

Смежные вопросы