Automattic\WooCommerce\Internal\DataStores\Orders
CustomOrdersTableController::changing_data_source_with_sync_pending_is_allowed
Returns a value indicating if changing the authoritative data source for orders while there are orders pending synchronization is allowed.
Метод класса: CustomOrdersTableController{}
Хуки из метода
Возвращает
bool.
Использование
// private - только в коде основоного (родительского) класса $result = $this->changing_data_source_with_sync_pending_is_allowed(): bool;
Код CustomOrdersTableController::changing_data_source_with_sync_pending_is_allowed() CustomOrdersTableController::changing data source with sync pending is allowed WC 11.3.0
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 );
}