1
任何人都可以指示我在哪裏可以找到文件,我可以在其中更改woocommerce結帳頁面中的「州/縣」和「郵編」標題?WOO商務在結帳頁上更改標題
任何人都可以指示我在哪裏可以找到文件,我可以在其中更改woocommerce結帳頁面中的「州/縣」和「郵編」標題?WOO商務在結帳頁上更改標題
WooCommerce提供掛鉤這一點: 請Customizing checkout fields using actions and filters
,你會在該網頁上看到你可以連接的功能(這是您在您的孩子的functions.php例如保存)以WooCommerce結帳頁面並更改可用的數據。
讓你的代碼看起來是這樣的:
/ Hook in
add_filter('woocommerce_checkout_fields' , 'custom_override_checkout_fields');
// Our hooked in function - $fields is passed via the filter!
function custom_override_checkout_fields($fields) {
$fields['shipping']['shipping_postcode']['label'] = 'My new postcode title';
$fields['shipping']['shipping_state']['label'] = 'My new state title';
return $fields;
}
鏈接頁面上的其他實例和領域。
轉到你的主題/ woocommerce /結帳和搜索 – Firefog