Automattic\WooCommerce\Blocks\Domain\Services
CheckoutFields::get_field_location()
Gets the location of a field.
Метод класса: CheckoutFields{}
Хуков нет.
Возвращает
Строку
. The location of the field.
Использование
$CheckoutFields = new CheckoutFields(); $CheckoutFields->get_field_location( $field_key );
- $field_key(строка) (обязательный)
- The key of the field to get the location for.
Код CheckoutFields::get_field_location() CheckoutFields::get field location WC 9.5.1
public function get_field_location( $field_key ) { foreach ( $this->fields_locations as $location => $fields ) { if ( in_array( $field_key, $fields, true ) ) { return $location; } } return ''; }