Automattic\WooCommerce\Blocks\Domain\Services
CheckoutFieldsFrontend::edit_account_form_required_fields()
Register required additional contact fields.
Method of the class: CheckoutFieldsFrontend{}
No Hooks.
Return
Array
.
Usage
$CheckoutFieldsFrontend = new CheckoutFieldsFrontend(); $CheckoutFieldsFrontend->edit_account_form_required_fields( $fields );
- $fields(array) (required)
- Required fields.
CheckoutFieldsFrontend::edit_account_form_required_fields() CheckoutFieldsFrontend::edit account form required fields code WC 9.2.3
public function edit_account_form_required_fields( $fields ) { $additional_fields = $this->checkout_fields_controller->get_fields_for_location( 'contact' ); foreach ( $additional_fields as $key => $field ) { if ( ! empty( $field['required'] ) ) { $fields[ $key ] = $field['label']; } } return $fields; }