Automattic\WooCommerce\Internal\DataStores\Orders

OrdersTableDataStore::get_all_order_column_mappings_for_cacheprivateWC 10.8.0

Return combined mappings for all order tables, always using the full set of operational data columns defined in the base OrdersTableDataStore class. This ensures that cached order data objects are complete regardless of which data store subclass populates the cache, preventing cross-bleed when different data stores (orders, refunds, subscriptions) share the same cache group.

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

Хуков нет.

Возвращает

array<string,. array<string, array<string, string>>> Return combined mapping with full operational data columns.

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

// private - только в коде основоного (родительского) класса
$result = $this->get_all_order_column_mappings_for_cache();

Список изменений

С версии 10.8.0 Введена.

Код OrdersTableDataStore::get_all_order_column_mappings_for_cache() WC 11.1.1

private function get_all_order_column_mappings_for_cache() {
	if ( ! isset( $this->all_order_column_mapping_for_cache ) ) {
		$this->all_order_column_mapping_for_cache = array(
			'orders'           => self::BASE_ORDER_COLUMN_MAPPING,
			'billing_address'  => self::BASE_BILLING_ADDRESS_COLUMN_MAPPING,
			'shipping_address' => self::BASE_SHIPPING_ADDRESS_COLUMN_MAPPING,
			'operational_data' => self::BASE_OPERATIONAL_DATA_COLUMN_MAPPING,
		);
	}

	return $this->all_order_column_mapping_for_cache;
}