Automattic\WooCommerce\Internal\DataStores\Orders

DataSynchronizer::get_ignored_order_props()publicWC 8.6.0

Keys that can be ignored during synchronization or verification.

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

Хуки из метода

Возвращает

Строку[].

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

$DataSynchronizer = new DataSynchronizer();
$DataSynchronizer->get_ignored_order_props();

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

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

Код DataSynchronizer::get_ignored_order_props() WC 9.7.1

public function get_ignored_order_props() {
	/**
	 * Allows modifying the list of order properties that are ignored during HPOS synchronization or verification.
	 *
	 * @param string[] List of order properties or meta keys.
	 * @since 8.6.0
	 */
	$ignored_props = apply_filters( 'woocommerce_hpos_sync_ignored_order_props', array() );
	$ignored_props = array_filter( array_map( 'trim', array_filter( $ignored_props, 'is_string' ) ) );

	return array_merge(
		$ignored_props,
		array(
			'_paid_date', // This has been deprecated and replaced by '_date_paid' in the CPT datastore.
			'_completed_date', // This has been deprecated and replaced by '_date_completed' in the CPT datastore.
			EditLock::META_KEY_NAME,
		)
	);
}