woocommerce_hold_stock_for_checkout

woocommerce_hold_stock_for_checkout

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

See hook in core

Displaying hooks found in version: woocommerce.9.7.1

apply_filters('woocommerce_hold_stock_for_checkout') is found 3 times:

  • /includes/wc-stock-functions.php line 423
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
         *
         * @since 4.3.0
         * @param bool $enabled Default to true if managing stock globally.
         */
        if ( ! apply_filters( 'woocommerce_hold_stock_for_checkout', wc_string_to_bool( get_option( 'woocommerce_manage_stock', 'yes' ) ) ) ) {
            return 0;
        }
     
        $reserve_stock = new ReserveStock();
        return $reserve_stock->get_reserved_stock( $product, $exclude_order_id );
    }
  • /includes/wc-stock-functions.php line 447
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    *
     * @since @since 4.1.0
     * @param bool $enabled Default to true if managing stock globally.
     */
    if ( ! apply_filters( 'woocommerce_hold_stock_for_checkout', wc_string_to_bool( get_option( 'woocommerce_manage_stock', 'yes' ) ) ) ) {
        return;
    }
     
    $order = $order instanceof WC_Order ? $order : wc_get_order( $order );
     
    if ( $order ) {
  • /includes/wc-stock-functions.php line 474
    470
    471
    472
    473
    474
    475
    476
    477
    478
    479
    480
    *
     * @since 4.3.0
     * @param bool $enabled Default to true if managing stock globally.
     */
    if ( ! apply_filters( 'woocommerce_hold_stock_for_checkout', wc_string_to_bool( get_option( 'woocommerce_manage_stock', 'yes' ) ) ) ) {
        return;
    }
     
    $order = $order instanceof WC_Order ? $order : wc_get_order( $order );
     
    if ( $order ) {