Automattic\WooCommerce\Database\Migrations\CustomOrderTable
PostMetaToOrderMetaMigrator::get_meta_config()
Generate config for meta data migration.
{} Это метод класса: PostMetaToOrderMetaMigrator{}
Хуков нет.
Возвращает
Массив
. Meta data migration config.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_meta_config(): array;
Код PostMetaToOrderMetaMigrator::get_meta_config() PostMetaToOrderMetaMigrator::get meta config WC 6.8.0
protected function get_meta_config(): array { global $wpdb; // TODO: Remove hardcoding. $this->table_names = array( 'orders' => $wpdb->prefix . 'wc_orders', 'addresses' => $wpdb->prefix . 'wc_order_addresses', 'op_data' => $wpdb->prefix . 'wc_order_operational_data', 'meta' => $wpdb->prefix . 'wc_orders_meta', ); return array( 'source' => array( 'meta' => array( 'table_name' => $wpdb->postmeta, 'entity_id_column' => 'post_id', 'meta_key_column' => 'meta_key', 'meta_value_column' => 'meta_value', ), 'entity' => array( 'table_name' => $this->table_names['orders'], 'source_id_column' => 'id', 'id_column' => 'id', ), 'excluded_keys' => $this->excluded_columns, ), 'destination' => array( 'meta' => array( 'table_name' => $this->table_names['meta'], 'entity_id_column' => 'order_id', 'meta_key_column' => 'meta_key', 'meta_value_column' => 'meta_value', 'entity_id_type' => 'int', 'meta_id_column' => 'id', ), ), ); }