感谢Dbranes的回答。
替换:
<?php foreach ($checkout->checkout_fields[\'billing\'] as $key => $field) : ?>
<?php woocommerce_form_field( $key, $field, $checkout->get_value( $key ) ); ?>
<?php endforeach; ?>
使用:
<?php
// order the keys for your custom ordering or delete the ones you don\'t need
$mybillingfields=array(
"billing_first_name",
"billing_last_name",
"billing_company",
"billing_address_1",
"billing_address_2",
"billing_city",
"billing_state",
"billing_postcode",
"billing_country",
"billing_email",
"billing_phone",
);
foreach ($mybillingfields as $key) : ?>
<?php woocommerce_form_field( $key, $checkout->checkout_fields[\'billing\'][$key], $checkout->get_value( $key ) ); ?>
<?php endforeach; ?>