woocommerce_product_has_options
Returns whether or not the product has additional options that need selecting before adding to cart.
Использование
add_filter( 'woocommerce_product_has_options', 'wp_kama_woocommerce_product_has_options_filter', 10, 2 ); /** * Function for `woocommerce_product_has_options` filter-hook. * * @param $false * @param $that * * @return */ function wp_kama_woocommerce_product_has_options_filter( $false, $that ){ // filter... return $false; }
- $false
- -
- $that
- -
Список изменений
С версии 3.0.0 | Введена. |
Где вызывается хук
woocommerce_product_has_options
woocommerce_product_has_options
woocommerce/includes/abstracts/abstract-wc-product.php 1857
return apply_filters( 'woocommerce_product_has_options', false, $this );
woocommerce/includes/class-wc-product-variable.php 593
return apply_filters( 'woocommerce_product_has_options', true, $this );