如何在WooCommerce我的帐户/编辑地址中编辑文本。我想将其从收货地址更改为(收货地址)
当前文本:您尚未设置这种类型的地址。 (收货地址)
将文本更改为:您尚未设置这种类型的地址。 (收货地址)
答案 0 :(得分:0)
您需要将以下提及的文件复制到活动主题中:
从->
复制这些文件TO(将两个文件都粘贴到此处)-> wp-content / themes /(ActiveThemeFolder)/ woocommerce / myaccount /
然后按照以下主题文件中的提及方式将“送货地址”重命名为“送货地址”。
编辑(my-address.php)-
$get_addresses = apply_filters( 'woocommerce_my_account_get_addresses', array(
'billing' => __( 'Billing address', 'woocommerce' ),
'shipping' => __( 'Shipping address', 'woocommerce' ),
), $customer_id );
收件人
$get_addresses = apply_filters( 'woocommerce_my_account_get_addresses', array(
'billing' => __( 'Billing address', 'woocommerce' ),
'shipping' => __( 'Delivery address', 'woocommerce' ),
), $customer_id );
编辑(form-edit-address.php)-
$page_title = ( 'billing' === $load_address ) ? __( 'Billing address', 'woocommerce' ) : __( 'Shipping address', 'woocommerce' );
收件人
$page_title = ( 'billing' === $load_address ) ? __( 'Billing address', 'woocommerce' ) : __( 'Delivery address', 'woocommerce' );
答案 1 :(得分:0)
只需在活动主题的functions.php中添加以下代码段-
function change_woocommerce_my_account_get_addresses( $addresses ){
if( isset( $addresses['shipping'] ) ) $addresses['shipping'] = __( 'Delivery address', 'your-text-domain' );
return $addresses;
}
add_filter( 'woocommerce_my_account_get_addresses', 'change_woocommerce_my_account_get_addresses' );