Guest User

Untitled

a guest
Dec 18th, 2018
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. function woo_add_custom_general_fields() {
  2.  
  3. echo '<div class="options_group">';
  4.  
  5. $users = get_users( array( 'fields' => array( 'ID' ) ) );
  6. foreach($users as $key => $term){
  7. $options[$term] = $term;
  8. }
  9.  
  10. woocommerce_wp_select( array(
  11. 'id' => '_select',
  12. 'label' => __( 'Custom Select Field', 'boipoka' ),
  13. 'options' => $options
  14. )
  15. );
  16. echo '</div>';
  17. }
  18. add_action( 'woocommerce_product_options_general_product_data','woo_add_custom_general_fields' );
Add Comment
Please, Sign In to add comment