my custom fields not save in my edit product
-
hello all im make this code to put in my edit products but i dont know why the taxonomy dont saved in my post y share you my code i put all hooks and nothing change : i put in products/variation product seccion becose i need to show in attributes seccion..... <label for="brand" class="form-label"><?php esc_html_e( 'Brand', 'dokan-lite' ); ?> <i class="fas fa-question-circle tips" aria-hidden="true" data-title="<?php esc_html_e( 'Select the brand for your watch', 'dokan-lite' ); ?>"></i></label> <?php require_once DOKAN_LIB_DIR.'/class.taxonomy-walker.php'; $term = wp_get_post_terms( $post_id, 'brand', array( 'fields' => 'all') ); $selected = ( $term ) ? $term : array(); $drop_down_brand = wp_dropdown_categories( array( 'pro' => true, 'thepostid' => $post_id, 'show_option_none' => __( 'Select brand', 'dokan' ), 'hierarchical' => 1, 'hide_empty' => 0, 'name' => 'brand[]', 'id' => 'brand', 'taxonomy' => 'brand', 'title_li' => '', 'class' => 'product_tags dokan-form-control dokan-select2', 'exclude' => '', 'selected' => $selected, 'echo' => 0, ) ); echo str_replace( '<select', '<select data-placeholder="'.__( 'Select brand', 'dokan' ).'" single="single" ', $drop_down_brand ); // validate acf fields before save add_action('dokan_process_product_meta',$drop_down_brand, $post, $post_id, 10 ); // save custom field data in product meta. add_action( 'dokan_new_product_added', $drop_down_brand, $post, $post_id, 10, 2 ); add_action( 'dokan_product_updated', $drop_down_brand, $post, $post_id, 10, 2 ); add_action( 'dokan_product_edit_after_product_tags', $drop_down_brand, $post, $post_id );?> please can see or help me if i need another hook or something thanks for all
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘my custom fields not save in my edit product’ is closed to new replies.