woocommerce_can_reduce_order_stock

woocommerce_can_reduce_order_stock

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.8.1

apply_filters('woocommerce_can_reduce_order_stock') is found 1 times:

  • /includes/wc-stock-functions.php line 171
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    } else {
        $order = wc_get_order( $order_id );
    }
    // We need an order, and a store with stock management to continue.
    if ( ! $order || 'yes' !== get_option( 'woocommerce_manage_stock' ) || ! apply_filters( 'woocommerce_can_reduce_order_stock', true, $order ) ) {
        return;
    }
     
    $changes = array();
     
    // Loop over all items.