1

我的结帐目前看起来像这样,在 woocommerce 后端启用了“本地取货”:

在此处输入图像描述

是否可以将其更改为例如“从我们的商店取货”?

“运输”部分的源代码是:

<tr class="shipping">
    <th>Shipping</th>
    <td data-title="Shipping">
                    <ul id="shipping_method">
                                    <li>
                        <input type="radio" name="shipping_method[0]" data-index="0" id="shipping_method_0_flat_rate1" value="flat_rate:1" class="shipping_method"  />
                                <label for="shipping_method_0_flat_rate1">Standard: <span class="woocommerce-Price-amount amount"><span class="woocommerce-Price-currencySymbol">&#x62f;.&#x625;</span>30.00</span></label>                 </li>
                                    <li>
                        <input type="radio" name="shipping_method[0]" data-index="0" id="shipping_method_0_local_pickup2" value="local_pickup:2" class="shipping_method"  checked='checked' />
                                <label for="shipping_method_0_local_pickup2">Local pickup: <span class="woocommerce-Price-amount amount"><span class="woocommerce-Price-currencySymbol">&#x62f;.&#x625;</span>0.00</span></label>                   </li>
                            </ul>


            </td>
</tr>

提前致谢!

4

2 回答 2

3

您可以直接从

Woocommerce => 设置 => 运输区域 => 编辑(您需要更改的区域名称)=> 运输方式 => 编辑(本地取货)=> 根据您的需要更改标签,一切就绪。

于 2019-08-28T05:18:56.933 回答
1

将此添加到您的主题(或子主题,如果您正在使用它)function.php 文件:

add_filter( 'woocommerce_cart_shipping_method_full_label', 'remove_local_pickup_free_label', 10, 2 );
function remove_local_pickup_free_label($full_label, $method){
    if( $method->id == 'shipping_method_0_local_pickup2' )
    $full_label = str_replace("Local Pickup","Store Pickup",$full_label);
  return $full_label;
}
于 2018-11-28T20:07:46.527 回答