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.

Method of the class: OrdersTableDataStore{}

No Hooks.

Returns

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

Usage

// private - for code of main (parent) class only
$result = $this->get_all_order_column_mappings_for_cache();

Changelog

Since 10.8.0 Introduced.

OrdersTableDataStore::get_all_order_column_mappings_for_cache() code WC 10.8.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;
}