Adding metadata to product form
Viewing 2 Posts - 1 through 2 (of 2 total)
Author | Posts |
---|---|
June 24, 2015 at 9:35 pm 53028 | |
Nayem | I am attempting to add a meta field to the new product and edit product form. I have gotten the field to appear on the back-end admin panel and on the pages for the new product and the edit product page. However, I am only able to successfully save the meta from the back-end admin panel which I have disabled for users. I need the meta to be saved when the seller creates a new product or updates an existing one.
I have done the following:
Added this code which stores the meta successfully from the back-end admin panel:
I have added the following code to the new product form on the front-end, the field appears but does not store the new data when submitted:
I have added the following code to the edit product form on the front-end, the field appears but does not store the new data when submitted:
Please help me to store this meta when creating and updating a product from the front end. Thank you. |
June 25, 2015 at 8:29 pm 53212 | |
Bryan | Issue solved, I simply needed to add the following dokan hooks before function x_add_fields_save( $post_id ): add_action( ‘dokan_process_product_meta’, ‘x_add_fields_save’ ); Works like magic! |
June 27, 2015 at 9:13 am 53310 | |
Nayem | Hello Bryan, I am very glad to know that your issue is now solved. Great work. |
Viewing 2 Posts - 1 through 2 (of 2 total)