Automattic\WooCommerce\Database\Migrations\CustomOrderTable

PostToOrderAddressTableMigrator::get_meta_column_config()publicWC 1.0

Get meta data config.

Метод класса: PostToOrderAddressTableMigrator{}

Хуков нет.

Возвращает

\Строку[][]. Config.

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

$PostToOrderAddressTableMigrator = new PostToOrderAddressTableMigrator();
$PostToOrderAddressTableMigrator->get_meta_column_config(): array;

Код PostToOrderAddressTableMigrator::get_meta_column_config() WC 8.7.0

public function get_meta_column_config(): array {
	$type = $this->type;

	return array(
		"_{$type}_first_name" => array(
			'type'        => 'string',
			'destination' => 'first_name',
		),
		"_{$type}_last_name"  => array(
			'type'        => 'string',
			'destination' => 'last_name',
		),
		"_{$type}_company"    => array(
			'type'        => 'string',
			'destination' => 'company',
		),
		"_{$type}_address_1"  => array(
			'type'        => 'string',
			'destination' => 'address_1',
		),
		"_{$type}_address_2"  => array(
			'type'        => 'string',
			'destination' => 'address_2',
		),
		"_{$type}_city"       => array(
			'type'        => 'string',
			'destination' => 'city',
		),
		"_{$type}_state"      => array(
			'type'        => 'string',
			'destination' => 'state',
		),
		"_{$type}_postcode"   => array(
			'type'        => 'string',
			'destination' => 'postcode',
		),
		"_{$type}_country"    => array(
			'type'        => 'string',
			'destination' => 'country',
		),
		"_{$type}_email"      => array(
			'type'        => 'string',
			'destination' => 'email',
		),
		"_{$type}_phone"      => array(
			'type'        => 'string',
			'destination' => 'phone',
		),
	);
}