重新排序自定义计费字段Woocommerce

时间:2019-02-05 11:33:17

标签: custom-fields hook-woocommerce billing

我在结帐和计费中添加了四个字段,例如增值税,PEC,财政代码和收件人代码。我成功地显示和保存数据。在代码段下方:

add_action('woocommerce_after_edit_account_address_form', function() 
{

    ?>

<fieldset>

<legend>

<?php _e('Informazioni Fiscali', 'fatt-24') ?> <!-- edited label 
Davide Iandoli 29.01.2019 -->

</legend>

<?php if (customer_use_cf()) { ?>

<p class="woocommerce-FormRow woocommerce-FormRow--wide form-row form-row-wide">

<label for="billing_fiscalcode">

  <?php _e('Codice Fiscale', 'fatt-24'); ?>

</label>

...

<p class="woocommerce-FormRow woocommerce-FormRow--wide form-row form-row-wide">

<label for="billing_vatcode">

  <?php _e('Partita IVA', 'fatt-24')?>

</label>

...

<span class="description">

<?php _e('inserisci una Partita Iva valida', 'fatt-24'); ?> <!-- edited label Davide Iandoli 29.01.2019 -->

</span> </p>

<?php } ?> 

<p class="woocommerce-FormRow woocommerce-FormRow--wide form-row form-row-wide">

<label for="billing_recipientcode">

  <?php _e('Codice Destinatario', 'fatt-24')?>

</label>

...

<p class="woocommerce-FormRow woocommerce-FormRow--wide form-row form-row-wide">

<label for="billing_pec">

<?php _e('Indirizzo PEC', 'fatt-24')?>

</label>

<input type="text" class="woocommerce-Input input-text" name="billing_pec" id="billing_pec" value="<?php echo esc_attr(user_pecaddress($user_id)) ?>" />

<span class="description">

<?php _e('inserisci un indirizzo PEC', 'fatt-24'); ?> 

</fieldset> 

<div class="clear"></div>

问题在于,在所有其他帐单信息之后,我在这些字段之前显示了“提交”按钮。我希望把它放在后面。有什么建议么?谢谢 大卫

0 个答案:

没有答案