woocommerce_can_restore_order_stock хук-фильтр . WC 1.0
We need an order, and a store with stock management to continue.
Использование
add_filter( 'woocommerce_can_restore_order_stock', 'filter_function_name_9957', 10, 2 ); function filter_function_name_9957( $true, $order ){ // filter... return $true; }
- $true
- -
- $order
- -
Где вызывается хук
woocommerce_can_restore_order_stock
woocommerce/includes/wc-stock-functions.php 266
if ( ! $order || 'yes' !== get_option( 'woocommerce_manage_stock' ) || ! apply_filters( 'woocommerce_can_restore_order_stock', true, $order ) ) {