woocommerce_hold_stock_for_checkout
woocommerce_hold_stock_for_checkout
Appears in: woocommerce.3.9.0, woocommerce.3.9.1, woocommerce.3.9.2, woocommerce.3.9.3, woocommerce.4.0.0, woocommerce.4.0.1, woocommerce.4.1.0, woocommerce.4.1.1, woocommerce.4.2.0, woocommerce.4.2.1, woocommerce.4.3.0, woocommerce.4.3.1, woocommerce.4.3.2, woocommerce.4.3.3, woocommerce.4.4.0, woocommerce.4.4.1, woocommerce.4.5.1, woocommerce.4.5.2, woocommerce.4.6.0, woocommerce.4.6.1, woocommerce.4.6.2, woocommerce.4.7.0, woocommerce.4.7.1, woocommerce.4.8.0, woocommerce.4.9.0, woocommerce.4.9.1, woocommerce.4.9.2, woocommerce.5.0.0, woocommerce.5.1.0, woocommerce.5.2.0, woocommerce.5.2.1, woocommerce.5.2.2, woocommerce.5.3.0, woocommerce.5.4.0, woocommerce.5.4.1, woocommerce.5.5.0, woocommerce.5.5.1, woocommerce.5.5.2, woocommerce.5.6.0, woocommerce.5.6.1, woocommerce.5.7.0, woocommerce.5.7.1, woocommerce.5.8.0, woocommerce.6.3.1, woocommerce.6.4.1, woocommerce.6.5.1, woocommerce.6.6.1, woocommerce.6.7.0, woocommerce.6.8.0, woocommerce.6.8.1, woocommerce.6.8.2, woocommerce.6.9.0, woocommerce.6.9.4, woocommerce.7.0.0, woocommerce.7.1.0, woocommerce.7.1.1, woocommerce.7.2.2, woocommerce.7.3.0, woocommerce.7.4.0, woocommerce.7.4.1, woocommerce.7.5.1, woocommerce.7.6.0, woocommerce.7.6.1, woocommerce.7.7.0, woocommerce.7.7.1, woocommerce.7.8.1, woocommerce.7.9.0, woocommerce.8.0.3, woocommerce.8.1.1, woocommerce.8.2.1, woocommerce.8.2.2, woocommerce.8.3.1, woocommerce.8.4.0, woocommerce.8.5.1, woocommerce.8.5.2, woocommerce.8.6.0, woocommerce.8.6.1, woocommerce.8.7.0, woocommerce.8.8.3, woocommerce.8.9.2, woocommerce.8.9.3, woocommerce.9.0.2, woocommerce.9.1.2, woocommerce.9.1.4, woocommerce.9.2.2, woocommerce.9.2.3, woocommerce.9.3.1, woocommerce.9.3.3, woocommerce.9.4.2, woocommerce.9.4.3, woocommerce.9.5.1
Hook Type: filter
Displaying hooks found in version: woocommerce.9.5.1apply_filters('woocommerce_hold_stock_for_checkout') is found 5 times:
- /includes/data-stores/class-wc-coupon-data-store-cpt.php line 542
if ( 0 >= $usage_limit || 0 >= $held_time ) { return null; } if ( ! apply_filters( 'woocommerce_hold_stock_for_checkout', true ) ) { return null; } // Make sure we have usage_count meta key for this coupon because its required for `$query_for_usages`. // We are not directly modifying `$query_for_usages` to allow for `usage_count` not present only keep that query simple. if ( ! metadata_exists( 'post', $coupon->get_id(), 'usage_count' ) ) {
- /includes/data-stores/class-wc-coupon-data-store-cpt.php line 641
// This coupon do not have any restriction for usage per customer. No need to check further, lets bail. return null; } if ( ! apply_filters( 'woocommerce_hold_stock_for_checkout', true ) ) { return null; } $format = implode( "','", array_fill( 0, count( $user_aliases ), '%s' ) ); $query_for_usages = $wpdb->prepare(
- /includes/wc-stock-functions.php line 422
* * @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 446
* * @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 473
* * @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 ) {