Custom field in products

This topic contains 2 reply and 2 voices, and was last updated by migueldelacueva 10 years ago
Viewing 2 Posts - 1 through 2 (of 2 total)
Author Posts
April 2, 2014 at 10:16 pm 17870
migueldelacueva How can i create a Custom Field and associate it with a Product? And render that Custom field in the product template?
April 3, 2014 at 3:42 pm 17937
Sk Sk

hello migueldelacueva,

You could use hook ‘dokan_product_edit_after_downloadable’ to add Custom Field.

<?php do_action( 'dokan_product_edit_after_downloadable' ); ?>

This will show on the side-bar of product edit page.

………

You could show the fields in product page by using action hook ‘woocommerce_single_product_summary’.

<?php add_action( 'woocommerce_single_product_summary', 'your_function', 40 ); ?>

Please be aware on next update. You may lose your custom code.

Thank you.

April 3, 2014 at 6:38 pm 17954
migueldelacueva migueldelacueva

Hi and Thanks,

I am new with code, may you please specify that with an example and where do i have to write that?

i mean for
in order to add a custom field

and
in order to show fields in a product page

Viewing 2 Posts - 1 through 2 (of 2 total)