Automattic\WooCommerce\Internal\DataStores\Orders

DataSynchronizer::get_ignored_order_propspublicWC 8.6.0

Keys that can be ignored during synchronization or verification.

Method of the class: DataSynchronizer{}

Returns

String[].

Usage

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

Changelog

Since 8.6.0 Introduced.

DataSynchronizer::get_ignored_order_props() code WC 10.7.0

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,
		)
	);
}