Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Before/after shop loop item hooks don't work with Products and Product Collection #10378

Closed
kmanijak opened this issue Jul 27, 2023 · 0 comments
Assignees
Labels
block: product collection Issues related to the Product Collection block block-type: product-query Issues related to/affecting all product-query variations. category: extensibility Work involving adding or updating extensibility. Useful to combine with other scopes impacted. type: bug The issue/PR concerns a confirmed bug.

Comments

@kmanijak
Copy link
Contributor

kmanijak commented Jul 27, 2023

Background

When working on #10332 I found out:

  • woocommerce_before_shop_loop_item
  • woocommerce_after_shop_loop_item
    hooks don't with Products and Product Collection blocks.

Steps to reproduce

  1. Go to Editor
  2. Add Products (Beta) / Product Collection block
  3. In your theme's functions.php add:
add_action( 'woocommerce_before_shop_loop_item' , function () {
	echo 'Hook: woocommerce_before_shop_loop_item';
});

add_action( 'woocommerce_after_shop_loop_item' , function () {
	echo 'Hook: woocommerce_after_shop_loop_item';
});
  1. Go to the frontend

Expected: The content is rendered above and below each product
Actual: It's not there

@kmanijak kmanijak added type: bug The issue/PR concerns a confirmed bug. category: extensibility Work involving adding or updating extensibility. Useful to combine with other scopes impacted. block-type: product-query Issues related to/affecting all product-query variations. block: product collection Issues related to the Product Collection block labels Jul 27, 2023
@kmanijak kmanijak self-assigned this Jul 31, 2023
@kmanijak kmanijak closed this as completed Aug 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
block: product collection Issues related to the Product Collection block block-type: product-query Issues related to/affecting all product-query variations. category: extensibility Work involving adding or updating extensibility. Useful to combine with other scopes impacted. type: bug The issue/PR concerns a confirmed bug.
Projects
None yet
Development

No branches or pull requests

1 participant