Wordpress/Woocommerce 사용.Wordpress : 계좌에 맞춤 청구 필드 저장 청구서 수신 주소
"NIF/CIF"라는 체크 아웃 페이지에 맞춤 결제 필드를 추가하는 코드가 있습니다. 그것은 잘 작동하지만 그 값은 고객 계정 "청구서 수신 주소"데이터에 저장되지 않습니다.
일단 고객이 첫 주문을하면 모든 청구서 수신 주소 값이 주소 (주소, 주, 국가 등)에 저장되지만 사용자 정의 필드는 저장되지 않습니다.
내 함수에서 데이터베이스의 값을 저장하는 코드 줄이 누락되어 있지만이 방법을 시작하는 방법을 모르겠다.
/*******************************
CUSTOM BILLING FIELD
*********************************/
add_filter('woocommerce_billing_fields', 'custom_woocommerce_billing_fields');
function custom_woocommerce_billing_fields($fields)
{
$fields['nif_cif'] = array(
'label' => __('NIF/CIF', 'woocommerce'), // Add custom field label
'placeholder' => _x('NIF/CIF', 'placeholder', 'woocommerce'), // Add custom field placeholder
'required' => true, // if field is required or not
'clear' => false, // add clear or not
'type' => 'text', // add field type
'class' => array('my-css') // add class name
);
return $fields;
}
woocommerce_checkout_order_processed를 사용하는 방법을 보여 줄 수 있습니까? – JPashs