I'm new in the code world and I'm using Woocommerce with the Dokan plugin.
I added the code below to the add product page, but I need this code to be integrate with nexts pages in Woocommerce as edit page or single product page:
add_action( 'dokan_new_product_after_product_tags','new_product_field',10 );
function new_product_field(){ ?>
<div class="dokan-form-group">
<div>
<span>Zona de trabajo</span><br>
<label><input type="checkbox" value="Capital Federal" name="opcion1" />Capital Federal</label><br>
<label><input type="checkbox" value="BsAs G.B.A Norte" name="opcion2" />BsAs G.B.A Norte</label><br>
<label><input type="checkbox" value="BsAs G.B.A Oeste" name="opcion3" />BsAs G.B.A Oeste</label><br>
<label><input type="checkbox" value="BsAs G.B.A Sur" name="opcion4" />BsAs G.B.A Sur</label><br>
</div>
I am wondering, how can I make to integrate the code with hooks with the rest of the page.
I only have the table, but its doesn't nothing. Any help please?
Inspired from this code found on Github (from @nayemDevs), you will find below your revisited code with some additional functions that should handle some of your requirements (commented):
Code goes in functions.php file of the active child theme (or active theme). It could work.
As I can't really test the code for real, you will need to test it and maybe make some changes to it.
The first function handle your fields settings, title, field options…