Merge pull request #27514 from helgatheviking/has_options
Add woocommerce_product_has_options filter to has_options() method
This commit is contained in:
commit
5007d17596
|
@ -1738,7 +1738,7 @@ class WC_Product extends WC_Abstract_Legacy_Product {
|
|||
* @return boolean
|
||||
*/
|
||||
public function has_options() {
|
||||
return false;
|
||||
return apply_filters( 'woocommerce_product_has_options', false, $this );
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -590,7 +590,7 @@ class WC_Product_Variable extends WC_Product {
|
|||
* @return boolean
|
||||
*/
|
||||
public function has_options() {
|
||||
return true;
|
||||
return apply_filters( 'woocommerce_product_has_options', true, $this );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue