woocommerce_prevent_adjust_line_item_product_stock

woocommerce_prevent_adjust_line_item_product_stock

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

See hook in core

Displaying hooks found in version: woocommerce.9.7.1

apply_filters('woocommerce_prevent_adjust_line_item_product_stock') is found 1 times:

  • /includes/admin/wc-admin-functions.php line 241
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    * @param bool $prevent If should prevent.
     * @param WC_Order_Item $item Item object.
     * @param int           $item_quantity Optional quantity to check against.
     */
    if ( apply_filters( 'woocommerce_prevent_adjust_line_item_product_stock', false, $item, $item_quantity ) ) {
        return false;
    }
     
    $product = $item->get_product();
     
    if ( ! $product || ! $product->managing_stock() ) {