Title: Custom Team Names
Last modified: August 30, 2016

---

# Custom Team Names

 *  [Michael Vieth](https://wordpress.org/support/users/mavieth/)
 * (@mavieth)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/custom-team-names/)
 * Thanks for the awesome plugin!
 * I am having some issues with allowing users to submit custom team names. I only
   have two plugins installed (WooCommerce and WooCommerce Teams). Right now I can
   successfully submit a custom team name, but when I go to select that team name
   for a new donation, the custom team has not been added.
 * Are we required to add the each team manually or are they supposed to be automatically
   added to the drop down for teams to donate to?
 * The website: [http://bah.themichaelvieth.com/](http://bah.themichaelvieth.com/)
 * Thanks again for the plugin and your support!
 * [https://wordpress.org/plugins/woocommerce-teams/](https://wordpress.org/plugins/woocommerce-teams/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [Michael Vieth](https://wordpress.org/support/users/mavieth/)
 * (@mavieth)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/custom-team-names/#post-6284558)
 * Any update on this functionality?
 *  [ZealousWeb](https://wordpress.org/support/users/zealopensource/)
 * (@zealopensource)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/custom-team-names/#post-6284559)
 * Hi Michael Vieth,
 * I have solved this issue. You can add this code in plugin file if this could 
   be helpful to you.
 * Replace the function “save_wooteam_on_checkout” with below given code of same..
 * function save_wooteam_on_checkout( $order_id ) {
    // get teams $teamsRaw = explode(‘,’,
   esc_attr( get_option(‘wcft-teamList’) )); $teams[] = “Select your fundraising
   team…”; /*Changed by ZealousWeb, To save custom team names*/ foreach($teamsRaw
   as $t) { if(!empty($t)) { $teams[] = trim($t); $newteam[] = trim($t); } } /*Ends
   here*/ // save selection if ( !empty($_POST[‘team_id’]) && $_POST[‘team_id’] !
   = “0” ) { $teamName = $teams[$_POST[‘team_id’]]; update_post_meta( $order_id,‘
   Team Name’, $teamName); } // save user-submitted else if(!empty($_POST[‘team_name’])){
   $teamName = $_POST[‘team_name’]; update_post_meta( $order_id, ‘Team Name’, $teamName);/*
   Added by ZealousWeb, To save custom team names*/ $newteam[] = $teamName; $newteam
   = implode(‘,’, $newteam); update_option(‘wcft-teamList’,$newteam ); /*Ends here*/}//
   save default else { $teamName = “No team selected”; update_post_meta( $order_id,‘
   Team Name’, $teamName); } }
 * Thanks,
    ZealousWeb

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Custom Team Names’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/woocommerce-teams_ffffff.svg)
 * [WooCommerce Teams](https://wordpress.org/plugins/woocommerce-teams/)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-teams/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-teams/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-teams/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-teams/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [ZealousWeb](https://wordpress.org/support/users/zealopensource/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/custom-team-names/#post-6284559)
 * Status: not resolved