WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Платформа для конвертации и монетизации трафика
фильтр не описан

woocommerce_hold_stock_for_checkout хук-фильтр . WC 4.3.0

Filter: woocommerce_hold_stock_for_checkout Allows enable/disable hold stock functionality on checkout.

Использование

add_filter( 'woocommerce_hold_stock_for_checkout', 'filter_function_name_236' );
function filter_function_name_236( $enabled ){
	// filter...

	return $enabled;
}
$enabled(true/false)
Default to true if managing stock globally.

Список изменений

С версии 4.3.0 Введена.

Где вызывается хук

wc_get_held_stock_quantity()
woocommerce_hold_stock_for_checkout
wc_reserve_stock_for_order()
woocommerce_hold_stock_for_checkout
wc_release_stock_for_order()
woocommerce_hold_stock_for_checkout
WC_Coupon_Data_Store_CPT::check_and_hold_coupon()
woocommerce_hold_stock_for_checkout
WC_Coupon_Data_Store_CPT::check_and_hold_coupon_for_user()
woocommerce_hold_stock_for_checkout
woocommerce/includes/wc-stock-functions.php 317
if ( ! apply_filters( 'woocommerce_hold_stock_for_checkout', wc_string_to_bool( get_option( 'woocommerce_manage_stock', 'yes' ) ) ) ) {
woocommerce/includes/wc-stock-functions.php 340
if ( ! apply_filters( 'woocommerce_hold_stock_for_checkout', wc_string_to_bool( get_option( 'woocommerce_manage_stock', 'yes' ) ) ) ) {
woocommerce/includes/wc-stock-functions.php 366
if ( ! apply_filters( 'woocommerce_hold_stock_for_checkout', wc_string_to_bool( get_option( 'woocommerce_manage_stock', 'yes' ) ) ) ) {
woocommerce/includes/data-stores/class-wc-coupon-data-store-cpt.php 510
if ( ! apply_filters( 'woocommerce_hold_stock_for_checkout', true ) ) {
woocommerce/includes/data-stores/class-wc-coupon-data-store-cpt.php 607
if ( ! apply_filters( 'woocommerce_hold_stock_for_checkout', true ) ) {

Где используется хук в ядре WooCommerce

Использование не найдено.