我已经关注了以下link,它允许通过字段名称保存数据,即billing_city,billing_phone,这很棒并且对我有所帮助。
虽然他们需要添加代表帐号等额外信息。
我已将以下代码添加到我的form-login.php
中 <p class="form-row form-row-wide">
<label for="rep_account_number"><?php _e( 'Rep account number', 'woocommerce' ); ?> <span class="required">*</span></label>
<input type="text" class="input-text" name="billing_phone" id="rep_account_number" value="<?php if ( ! empty( $_POST['rep_account_number'] ) ) esc_attr_e( $_POST['rep_account_number'] ); ?>" />
</p>
现在我遇到的问题是如何将上述信息保存到个人帐户中。我找到了wp_usermeta表,其中包含一些标准字段名称,例如reg_billing_phone等。我无法弄明白。
帮助表示赞赏。
谢谢, 丹