• <bdo id='kT4h6'></bdo><ul id='kT4h6'></ul>
    <tfoot id='kT4h6'></tfoot>
  • <small id='kT4h6'></small><noframes id='kT4h6'>

  • <legend id='kT4h6'><style id='kT4h6'><dir id='kT4h6'><q id='kT4h6'></q></dir></style></legend>
    <i id='kT4h6'><tr id='kT4h6'><dt id='kT4h6'><q id='kT4h6'><span id='kT4h6'><b id='kT4h6'><form id='kT4h6'><ins id='kT4h6'></ins><ul id='kT4h6'></ul><sub id='kT4h6'></sub></form><legend id='kT4h6'></legend><bdo id='kT4h6'><pre id='kT4h6'><center id='kT4h6'></center></pre></bdo></b><th id='kT4h6'></th></span></q></dt></tr></i><div id='kT4h6'><tfoot id='kT4h6'></tfoot><dl id='kT4h6'><fieldset id='kT4h6'></fieldset></dl></div>
      1. Woocommerce 单品页面中的重命名描述选项卡

        时间:2023-12-02

          <tbody id='o4vxw'></tbody>

        <small id='o4vxw'></small><noframes id='o4vxw'>

            <i id='o4vxw'><tr id='o4vxw'><dt id='o4vxw'><q id='o4vxw'><span id='o4vxw'><b id='o4vxw'><form id='o4vxw'><ins id='o4vxw'></ins><ul id='o4vxw'></ul><sub id='o4vxw'></sub></form><legend id='o4vxw'></legend><bdo id='o4vxw'><pre id='o4vxw'><center id='o4vxw'></center></pre></bdo></b><th id='o4vxw'></th></span></q></dt></tr></i><div id='o4vxw'><tfoot id='o4vxw'></tfoot><dl id='o4vxw'><fieldset id='o4vxw'></fieldset></dl></div>

              <tfoot id='o4vxw'></tfoot>
              1. <legend id='o4vxw'><style id='o4vxw'><dir id='o4vxw'><q id='o4vxw'></q></dir></style></legend>
                  <bdo id='o4vxw'></bdo><ul id='o4vxw'></ul>

                • 本文介绍了Woocommerce 单品页面中的重命名描述选项卡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我将此代码粘贴到 function.php 中,但它没有按预期重命名产品页面选项卡 (http://www.noushasasart.com/product/harsh-bark/)

                  I pasted this code in function.php, but it didn't rename the product page tab as it supposed to (http://www.noushasasart.com/product/harsh-bark/)

                  function woo_remove_product_tabs($tabs) {
                      unset($tabs['reviews']);    // Remove the reviews tab
                      $tabs['description']['title'] = __('Additional Information');  // Rename the 
                  
                      description tab        
                      return $tabs;
                  }
                  

                  我该如何解决这个问题?

                  how can I solve this?

                  推荐答案

                  你忘记了过滤钩子:

                  add_filter( 'woocommerce_product_tabs', 'woo_customize_tabs', 100, 1 );
                  function woo_customize_tabs( $tabs ) {
                  
                      unset($tabs['reviews']);    // Remove the reviews tab
                  
                      $tabs['description']['title'] = __( 'More Information' ); // Rename the description tab
                  
                      return $tabs;
                  }
                  

                  代码进入您的活动子主题(或主题)的 function.php 文件或任何插件文件中.

                  所有代码都在 Woocommerce 3+ 上进行了测试并且可以运行.

                  All code is tested on Woocommerce 3+ and works.

                  更新(与您的评论相关) |重命名产品描述标题(在标签内):

                  Update (related to your comment) | Rename product description heading (inside the tab):

                  要重命名描述标题,请以这种方式使用 woocommerce_product_description_heading 过滤钩子:

                  To rename description heading use woocommerce_product_description_heading filter hook this way:

                  add_filter( 'woocommerce_product_description_heading', 'rename_product_description_heading', 10, 1 );
                  function rename_product_description_heading( $heading ) {
                      return  __( 'Additional Information', 'woocommerce' );
                  }
                  

                  代码进入您的活动子主题(或主题)的 function.php 文件或任何插件文件中.

                  所有代码都在 Woocommerce 3+ 上进行了测试并且可以运行.

                  All code is tested on Woocommerce 3+ and works.

                  官方相关文档:编辑产品数据标签

                  这篇关于Woocommerce 单品页面中的重命名描述选项卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何使用 PHPExcel 加入 Excel 文档? 下一篇:带有多个选项卡的弹出警报的 Javascript 会话超时

                  相关文章

                • <legend id='dQmC2'><style id='dQmC2'><dir id='dQmC2'><q id='dQmC2'></q></dir></style></legend>
                • <tfoot id='dQmC2'></tfoot>

                    • <bdo id='dQmC2'></bdo><ul id='dQmC2'></ul>

                    <i id='dQmC2'><tr id='dQmC2'><dt id='dQmC2'><q id='dQmC2'><span id='dQmC2'><b id='dQmC2'><form id='dQmC2'><ins id='dQmC2'></ins><ul id='dQmC2'></ul><sub id='dQmC2'></sub></form><legend id='dQmC2'></legend><bdo id='dQmC2'><pre id='dQmC2'><center id='dQmC2'></center></pre></bdo></b><th id='dQmC2'></th></span></q></dt></tr></i><div id='dQmC2'><tfoot id='dQmC2'></tfoot><dl id='dQmC2'><fieldset id='dQmC2'></fieldset></dl></div>

                    <small id='dQmC2'></small><noframes id='dQmC2'>