-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Feature request: Add ability to "exclude current product" from the Product Collection block #42572
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
EnhancementThe issue is a request for an enhancement.The issue is a request for an enhancement.KirigamiWC Store Editing (FSE)WC Store Editing (FSE)block: product collectionIssues related to the Product Collection blockIssues related to the Product Collection blockneeds: designThe issue requires design input/work from a designer.The issue requires design input/work from a designer.
Description
Is your feature request related to a problem? Please describe.
I have a store and I am using the "All Products Block" on the product page. I would like to display "other" products in my store with the exception of the one the user is currently on.
Describe the solution you'd like
I think an option in the editor to exclude the current product would be great. The option could even be hidden if the current post is not of type product.
Describe alternatives you've considered
I've tried Hand Picked Products, but in a store with continually changing inventory it would be inconvenient to edit every product's instance of the Hand Picked Products block. All products achieves the desired outcome, but it contains the current product too.
Additional context
To enable the block editor for a single product I used:
function kogarashi_activate_gutenberg_for_product( $can_edit, $post_type )
{
if ( $post_type == 'product' ) {
$can_edit = true;
}
return $can_edit;
}
add_filter(
'use_block_editor_for_post_type',
'kogarashi_activate_gutenberg_for_product',
20,
2
);Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
EnhancementThe issue is a request for an enhancement.The issue is a request for an enhancement.KirigamiWC Store Editing (FSE)WC Store Editing (FSE)block: product collectionIssues related to the Product Collection blockIssues related to the Product Collection blockneeds: designThe issue requires design input/work from a designer.The issue requires design input/work from a designer.