Title: Adding second provider doesn&#8217;t complete
Last modified: August 2, 2018

---

# Adding second provider doesn’t complete

 *  [da_Mask](https://wordpress.org/support/users/da_mask/)
 * (@da_mask)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/adding-second-provider-doesnt-complete/)
 * I’ve successfully added one Provider. When I add the second, the circle spins
   but never ends and no error is given. If (after 10 minutes) I refresh the page,
   the provider is there.
 * But when I try and use the provider in an Order, I select the provider and enter
   the tracking detail and click Save, I receive a message “Please select a Provider”.
 * I have tried deleting and re-adding providers, but always the same result.
 * Happy to do any troubleshooting on this.
    -  This topic was modified 7 years, 9 months ago by [da_Mask](https://wordpress.org/support/users/da_mask/).

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

 *  Thread Starter [da_Mask](https://wordpress.org/support/users/da_mask/)
 * (@da_mask)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/adding-second-provider-doesnt-complete/#post-10553413)
 * Just to update this, as soon as I press the Add Provider button (to add a second)
   the spinner beside that button becomes active/visable, and doesn’t stop spinning
   until I refresh the page.
 * I have tried disabling all plugins and code snippets on my site, but the spinner
   always spins once that button gets pressed.
 * There seems to be an issue with how the provider is being saved. For instance,
   I have also tried replacing the hard coded providers with the ones I want. I.
   e. I do a fresh install of your plugin, and I overwrite these lines:-
    `array('
   id' => 1, 'name' => 'Thailand post', 'tracking_url' => 'http://emsbot.com/#/?
   s=' , 'add_tracking_url' => 1 ),` `array( 'id' => 2, 'name' => 'Kerry express','
   tracking_url' => 'https://th.kerryexpress.com/en/track/?track=' , 'add_tracking_url'
   => 1 ),` With the providers I want, and then activate the plugin. This seems 
   to work, except when the completed email is sent, the first provider is always
   listed in the “Provider” column of the email, no matter which provider I’ve selected(
   all other columns of the email hold the correct info; i.e. tracking number, date
   and tracking url).
    -  This reply was modified 7 years, 9 months ago by [da_Mask](https://wordpress.org/support/users/da_mask/).
 *  [javiermates](https://wordpress.org/support/users/javiermates/)
 * (@javiermates)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/adding-second-provider-doesnt-complete/#post-10580803)
 * I think, the problem is a call to the wp_kses() function in mimo-woocommerce-
   order-tracking.php. Try changing line 268 from:
 * `$order = wp_kses( $_POST["list_item"] );`
 * to:
 * `$order = wp_kses( $_POST["list_item"], array() );`
 * The function needs a second argument.
 *  [asasergey](https://wordpress.org/support/users/asasergey/)
 * (@asasergey)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/adding-second-provider-doesnt-complete/#post-10621243)
 * Javiermates, thank’s. Perfect solution. Unfortunately the name of the carrier,
   all the same, there remains only one (when the client reviews the order).
 *  [newpadmin](https://wordpress.org/support/users/newpadmin/)
 * (@newpadmin)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/adding-second-provider-doesnt-complete/#post-10743430)
 * [@asasergey](https://wordpress.org/support/users/asasergey/)
 * To correct the provider name line 631 you have to replace
 * `$key = array_search( $order_id, array_column( $this->provider_list, 'id') );`
 * by
 *  `$key = array_search( $tracking_provider_id, array_column( $this->provider_list,'
   id') );`
 *  [asasergey](https://wordpress.org/support/users/asasergey/)
 * (@asasergey)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/adding-second-provider-doesnt-complete/#post-10755150)
 * [@newpadmin](https://wordpress.org/support/users/newpadmin/)
 * Thank you. Again a great solution.
 *  [clk87](https://wordpress.org/support/users/clk87/)
 * (@clk87)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/adding-second-provider-doesnt-complete/#post-10923877)
 * Thanks guys, this has been a huge help!
 *  Thread Starter [da_Mask](https://wordpress.org/support/users/da_mask/)
 * (@da_mask)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/adding-second-provider-doesnt-complete/#post-11142232)
 * I nearly fell off my chair when I saw the dev had issued an update for this plugin.
 * He has added [@newpadmin](https://wordpress.org/support/users/newpadmin/)’s edit,
   but unfortunately has neglected to add [@javiermates](https://wordpress.org/support/users/javiermates/)‘
   s edit, and therefor that second `array()` argument still needs to be added to
   line 268
    -  This reply was modified 7 years, 3 months ago by [da_Mask](https://wordpress.org/support/users/da_mask/).
    -  This reply was modified 7 years, 3 months ago by [da_Mask](https://wordpress.org/support/users/da_mask/).
 *  [Bruno Fernandes](https://wordpress.org/support/users/atletekno/)
 * (@atletekno)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/adding-second-provider-doesnt-complete/#post-11203716)
 * Finally a solution!
    Thanks [@newpadmin](https://wordpress.org/support/users/newpadmin/)
   and [@javiermates](https://wordpress.org/support/users/javiermates/).

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

The topic ‘Adding second provider doesn’t complete’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/mimo-woocommerce-order-tracking_e0cdbd.
   svg)
 * [MIMO Woocommerce Order Tracking](https://wordpress.org/plugins/mimo-woocommerce-order-tracking/)
 * [Support Threads](https://wordpress.org/support/plugin/mimo-woocommerce-order-tracking/)
 * [Active Topics](https://wordpress.org/support/plugin/mimo-woocommerce-order-tracking/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mimo-woocommerce-order-tracking/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mimo-woocommerce-order-tracking/reviews/)

 * 8 replies
 * 6 participants
 * Last reply from: [Bruno Fernandes](https://wordpress.org/support/users/atletekno/)
 * Last activity: [7 years, 2 months ago](https://wordpress.org/support/topic/adding-second-provider-doesnt-complete/#post-11203716)
 * Status: not resolved