woocommerce_product_allow_backorder_use_radio
Allow 3rd parties to control whether "Allow backorder?" option will use radio buttons or a select.
Использование
add_filter( 'woocommerce_product_allow_backorder_use_radio', 'wp_kama_woocommerce_product_allow_backorder_use_radio_filter' ); /** * Function for `woocommerce_product_allow_backorder_use_radio` filter-hook. * * @param bool $true If false, "Allow backorders?" will be shown as a select. * * @return bool */ function wp_kama_woocommerce_product_allow_backorder_use_radio_filter( $true ){ // filter... return $true; }
- $true(true|false)
- If false, "Allow backorders?" will be shown as a select.
По умолчанию: it will use radio buttons
Список изменений
С версии 7.6.0 | Введена. |
Где вызывается хук
woocommerce_product_allow_backorder_use_radio
woocommerce/includes/admin/meta-boxes/views/html-product-data-inventory.php 99
if ( apply_filters( 'woocommerce_product_allow_backorder_use_radio', true ) ) {