Hook to display element as product on category page

Question

I am creating a plugin and I am trying to add an element which will be displayed as a product. In the picture, the element is the red rectangle.

enter image description here

I have used this guide but none of the hooks there helped me.
I tried woocommerce_before_shop_loop, it adds the element behind the products, spending the whole page (in the DOM tree, it adds it as the parent of the products elements.

Also, woocommerce_before_shop_loop_item insert the element inside the product’s element container, before the sale badge.

Which hook can I use to achieve what I want?

Thanks

0
Omer 1 month 0 Answers 8 views 0

Leave an answer