wc_allow_changing_orders_storage_while_sync_is_pending
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!
Usage
add_filter( 'wc_allow_changing_orders_storage_while_sync_is_pending', 'wp_kama_wc_allow_changing_orders_storage_while_sync_is_pending_filter' ); /** * Function for `wc_allow_changing_orders_storage_while_sync_is_pending` filter-hook. * * @param bool $allow True to allow changing order storage when there are orders pending synchronization, false to disallow. * * @return bool */ function wp_kama_wc_allow_changing_orders_storage_while_sync_is_pending_filter( $allow ){ // filter... return $allow; }
- $allow(true|false)
- True to allow changing order storage when there are orders pending synchronization, false to disallow.
Changelog
Since 8.3.0 | Introduced. |
Where the hook is called
wc_allow_changing_orders_storage_while_sync_is_pending
woocommerce/src/Internal/DataStores/Orders/CustomOrdersTableController.php 716
return apply_filters( 'wc_allow_changing_orders_storage_while_sync_is_pending', false );