Automattic\WooCommerce\Blocks\Domain\Services
CheckoutFields::process_field_options
Processes the options for a field type and returns the new field_options array.
Метод класса: CheckoutFields{}
Хуков нет.
Возвращает
array. The updated $field_data array.
Использование
// private - только в коде основоного (родительского) класса $result = $this->process_field_options( $field_data, $options );
- $field_data(массив) (обязательный)
- The field data array to be updated.
- $options(массив) (обязательный)
- The options supplied during field registration.
Код CheckoutFields::process_field_options() CheckoutFields::process field options WC 11.1.0
private function process_field_options( $field_data, $options ) {
if ( 'checkbox' === $field_data['type'] ) {
$field_data = $this->process_checkbox_field( $field_data, $options );
} elseif ( 'select' === $field_data['type'] ) {
$field_data = $this->process_select_field( $field_data, $options );
}
return $field_data;
}