我编辑了表单billing.php,但它不工作
<?php if ( WC()->cart->ship_to_billing_address_only() && WC()->cart->needs_shipping() ) : ?>
<h3><?php _e( 'Billing & Shipping', 'woocommerce' ); ?></h3>
<?php else : ?>
<h3><?php _e( 'Billing Details', 'woocommerce' ); ?></h3>
<?php endif; ?>
<?php do_action( 'woocommerce_before_checkout_billing_form', $checkout ); ?
顺便说一句,你的问题还不清楚,
据我所知,这是WordPress插件,你需要更改语言字符串。
您可以看到有一个函数"e",并在该函数中添加您的字符串。
你提到它不起作用。请将您的文件与原始文件进行比较。
https://github.com/dafydb/ada/blob/9ab64c164f412e91178a6b5e5874c9cb3759fa07/woocommerce/checkout/form-billing.php
文件:woocommerce/templates/order/order-details.php
尝试替换:
<h3><?php _e( 'Billing Address', 'woocommerce' ); ?></h3>
带有
<h3><?php _e( 'Passenger Information', 'woocommerce' ); ?></h3>
您似乎在这里使用WooCommerce,因此我建议使用此处描述的翻译机制:http://docs.woothemes.com/document/woocommerce-localization/。
不建议直接更改源代码,因为在进行更新时会丢失更改。