Merge pull request #27514 from helgatheviking/has_options

Add woocommerce_product_has_options filter to has_options() method
This commit is contained in:
Roy Ho 2020-10-27 09:48:26 -07:00 committed by GitHub
commit 5007d17596
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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 );
}
/*

View File

@ -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 );
}