checkout

How to change Billing address field label in WooCommerce

 ̄綄美尐妖づ 提交于 2020-11-27 02:50:09
问题 In my design i have non standard billing fields label and markup. For example "Town / City *" should be "Province *". I have used WOO documentation, and filter woocommerce_billing_fields . And it works with class name, placeholder, create new fields. But I cant reach label changed. $out_arr['billing_city']['class'][0] = 'form-row-first'; $out_arr['billing_city']['label'] = __('Province', 'woocommerce'); $out_arr['billing_postcode']['label'] = __('Zipcode', 'woocommerce'); and using var_dump

How to change Billing address field label in WooCommerce

此生再无相见时 提交于 2020-11-27 02:49:49
问题 In my design i have non standard billing fields label and markup. For example "Town / City *" should be "Province *". I have used WOO documentation, and filter woocommerce_billing_fields . And it works with class name, placeholder, create new fields. But I cant reach label changed. $out_arr['billing_city']['class'][0] = 'form-row-first'; $out_arr['billing_city']['label'] = __('Province', 'woocommerce'); $out_arr['billing_postcode']['label'] = __('Zipcode', 'woocommerce'); and using var_dump

How can I change “Your order” text on checkout page in WooCommerce under certain conditions

六眼飞鱼酱① 提交于 2020-11-25 03:26:33
问题 With this code I can change "Your Order" text in checkout page. But I need to change if specific product in my cart or virtual product is in my cart. function custom_wc_translations($translated){ $text = array( 'Your order' => 'Your new phrase', 'any other string' => 'New string', ); $translated = str_ireplace( array_keys($text), $text, $translated ); return $translated; } add_filter( 'gettext', 'custom_wc_translations', 20 ); I found this code but for different place for specific product.