WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Купить персональные IPV4 и IPV6 прокси
функция не описана

WC_Meta_Box_Order_Data::init_address_fields() WC 1.0

Init billing and shipping fields we display + save.

Это метод класса: WC_Meta_Box_Order_Data

Возвращает

Null. Ничего.

Использование

$var = WC_Meta_Box_Order_Data::init_address_fields();

Код WC Meta Box Order Data::init address fields: woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-data.php WC 3.7.0

<?php
public static function init_address_fields() {

	self::$billing_fields = apply_filters(
		'woocommerce_admin_billing_fields', array(
			'first_name' => array(
				'label' => __( 'First name', 'woocommerce' ),
				'show'  => false,
			),
			'last_name'  => array(
				'label' => __( 'Last name', 'woocommerce' ),
				'show'  => false,
			),
			'company'    => array(
				'label' => __( 'Company', 'woocommerce' ),
				'show'  => false,
			),
			'address_1'  => array(
				'label' => __( 'Address line 1', 'woocommerce' ),
				'show'  => false,
			),
			'address_2'  => array(
				'label' => __( 'Address line 2', 'woocommerce' ),
				'show'  => false,
			),
			'city'       => array(
				'label' => __( 'City', 'woocommerce' ),
				'show'  => false,
			),
			'postcode'   => array(
				'label' => __( 'Postcode / ZIP', 'woocommerce' ),
				'show'  => false,
			),
			'country'    => array(
				'label'   => __( 'Country', 'woocommerce' ),
				'show'    => false,
				'class'   => 'js_field-country select short',
				'type'    => 'select',
				'options' => array( '' => __( 'Select a country&hellip;', 'woocommerce' ) ) + WC()->countries->get_allowed_countries(),
			),
			'state'      => array(
				'label' => __( 'State / County', 'woocommerce' ),
				'class' => 'js_field-state select short',
				'show'  => false,
			),
			'email'      => array(
				'label' => __( 'Email address', 'woocommerce' ),
			),
			'phone'      => array(
				'label' => __( 'Phone', 'woocommerce' ),
			),
		)
	);

	self::$shipping_fields = apply_filters(
		'woocommerce_admin_shipping_fields', array(
			'first_name' => array(
				'label' => __( 'First name', 'woocommerce' ),
				'show'  => false,
			),
			'last_name'  => array(
				'label' => __( 'Last name', 'woocommerce' ),
				'show'  => false,
			),
			'company'    => array(
				'label' => __( 'Company', 'woocommerce' ),
				'show'  => false,
			),
			'address_1'  => array(
				'label' => __( 'Address line 1', 'woocommerce' ),
				'show'  => false,
			),
			'address_2'  => array(
				'label' => __( 'Address line 2', 'woocommerce' ),
				'show'  => false,
			),
			'city'       => array(
				'label' => __( 'City', 'woocommerce' ),
				'show'  => false,
			),
			'postcode'   => array(
				'label' => __( 'Postcode / ZIP', 'woocommerce' ),
				'show'  => false,
			),
			'country'    => array(
				'label'   => __( 'Country', 'woocommerce' ),
				'show'    => false,
				'type'    => 'select',
				'class'   => 'js_field-country select short',
				'options' => array( '' => __( 'Select a country&hellip;', 'woocommerce' ) ) + WC()->countries->get_shipping_countries(),
			),
			'state'      => array(
				'label' => __( 'State / County', 'woocommerce' ),
				'class' => 'js_field-state select short',
				'show'  => false,
			),
		)
	);
}