Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function woo_add_custom_general_fields() {
- echo '<div class="options_group">';
- $users = get_users( array( 'fields' => array( 'ID' ) ) );
- foreach($users as $key => $term){
- $options[$term] = $term;
- }
- woocommerce_wp_select( array(
- 'id' => '_select',
- 'label' => __( 'Custom Select Field', 'boipoka' ),
- 'options' => $options
- )
- );
- echo '</div>';
- }
- add_action( 'woocommerce_product_options_general_product_data','woo_add_custom_general_fields' );
Add Comment
Please, Sign In to add comment