How to get product id in jetwoobuilder product loop

131 views Asked by At

I am building a 1+1 discount coupon plugin for WordPress and WooCommerce.

and the user defines in the plugin settings which category the promotion will apply to.

I want to display on the page a product archive built with the help of jetwoobuilder producers loop on every product that is in the category on sale of the add-on: "1+1".

So I created a shortcode that receives a product ID and returns whether it's in a category or not. The problem is that I can't get the product ID in an archive product format and send it to the shortcode, how to do it?

Alternatively, if someone has a way from the plugin itself to get the product ID through a widget that I will build for Elementor and put it in an archive product template and it will download the product ID - how can Nitzan do this?

I would really appreciate the help, thank you very much!

I tried to add a shortcode widget to the archive item template and do advanced there - and get the product ID and send it with the shortcode, and it keeps printing a mole ID for everyone (probably the ID of the archive page template

0

There are 0 answers