Automattic\WooCommerce\Internal\DataStores\Orders

CustomOrdersTableController::changing_data_source_with_sync_pending_is_allowedprivateWC 1.0

Returns a value indicating if changing the authoritative data source for orders while there are orders pending synchronization is allowed.

Method of the class: CustomOrdersTableController{}

Returns

true|false.

Usage

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

CustomOrdersTableController::changing_data_source_with_sync_pending_is_allowed() code WC 9.9.3

private function changing_data_source_with_sync_pending_is_allowed(): bool {
	/**
	 * Filter to allow changing where order data is stored, even when there are orders pending synchronization.
	 *
	 * DANGER! This filter is intended for usage when doing manual and automated testing in development environments only,
	 * it should NEVER be used in production environments. Order data corruption or loss can happen!
	 *
	 * @param bool $allow True to allow changing order storage when there are orders pending synchronization, false to disallow.
	 * @returns bool
	 *
	 * @since 8.3.0
	 */
	return apply_filters( 'wc_allow_changing_orders_storage_while_sync_is_pending', false );
}