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.3.3

apply_filters('woocommerce_prevent_adjust_line_item_product_stock') is found 1 times:

  • /includes/admin/wc-admin-functions.php line 240
    	 * @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() ) {