Adding new fields to product-edit.php

This topic contains 1 reply and 2 voices, and was last updated by towhid 8 years, 9 months ago
Viewing 1 Posts - 1 through 1 (of 1 total)
Author Posts
June 29, 2015 at 5:40 pm 53597
towhid I have set up custom taxonomies through my site. I went and added one of those custom taxonomies to the product-edit.php file using the following:
<div class="dokan-form-group dokan-list-category-box">
                                                    <h5><?php _e( 'Choose a location', 'dokan' );  ?></h5>
                                                    <ul class="dokan-checkbox-cat">
                                                        <?php
                                                        $term = array();
                                                        $term = wp_get_post_terms( $post_id, 'location', array( 'fields' => 'ids') );

                                                        include_once DOKAN_LIB_DIR.'/class.category-walker.php';
                                                        wp_list_categories(array(
                                                            'walker'       => new DokanCategoryWalker(),
                                                            'title_li'     => '',
                                                            'id'           => 'location',
                                                            'hide_empty'   => 0,
                                                            'taxonomy'     => 'location',
                                                            'hierarchical' => 1,
                                                            'selected'     => $term
                                                        ));
                                                        ?>
                                                    </ul>
                                                </div>
When I click update, it doesn't save my checkmark. How do I get the Update Product button to save the checkmark in the database?
June 30, 2015 at 10:30 am 53670
towhid towhid

Hello Cameron,

Please check this following topic which will help you know how to add a field in the product-edit.php page.
https://wedevs.com/support/topic/adding-metadata-to-product-form/

Thanks

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