woocommerce_product_has_options
Returns whether or not the product has additional options that need selecting before adding to cart.
Usage
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
- -
Changelog
| Since 3.0.0 | Introduced. |
Where the hook is called
woocommerce_product_has_options
woocommerce_product_has_options
woocommerce/includes/abstracts/abstract-wc-product.php 1912
return apply_filters( 'woocommerce_product_has_options', false, $this );
woocommerce/includes/class-wc-product-variable.php 615
return apply_filters( 'woocommerce_product_has_options', true, $this );