[Product Block Editor] remove digital products from target list (#39801)
* Fix remove digital products from the target list * Add changelog
This commit is contained in:
parent
afc8e0fac5
commit
5f7e20bed7
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: fix
|
||||
|
||||
[Product Block Editor] remove digital products from the target list #39769
|
|
@ -62,7 +62,8 @@ class RedirectionController {
|
|||
*/
|
||||
protected function is_product_supported( $product_id ): bool {
|
||||
$product = $product_id ? wc_get_product( $product_id ) : null;
|
||||
return $product && in_array( $product->get_type(), $this->supported_post_types, true );
|
||||
$digital_product = $product->is_downloadable() || $product->is_virtual();
|
||||
return $product && in_array( $product->get_type(), $this->supported_post_types, true ) && ! $digital_product;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue