/**
  * Output the report
  */
 public function output_report()
 {
     $this->prepare_items();
     echo '<div id="poststuff" class="woocommerce-reports-wide">';
     if (!empty($_GET['link_orders']) && wp_verify_nonce($_REQUEST['_wpnonce'], 'link_orders')) {
         $linked = wc_update_new_customer_past_orders(absint($_GET['link_orders']));
         echo '<div class="updated"><p>' . sprintf(_n('%s previous order linked', '%s previous orders linked', $linked, 'woocommerce'), $linked) . '</p></div>';
     }
     echo '<form method="post" id="woocommerce_customers">';
     $this->search_box(__('Search customers', 'woocommerce'), 'customer_search');
     $this->display();
     echo '</form>';
     echo '</div>';
 }
 /**
  * Output the report.
  */
 public function output_report()
 {
     $this->prepare_items();
     echo '<div id="poststuff" class="woocommerce-reports-wide">';
     if (!empty($_GET['link_orders']) && wp_verify_nonce($_REQUEST['_wpnonce'], 'link_orders')) {
         $linked = wc_update_new_customer_past_orders(absint($_GET['link_orders']));
         echo '<div class="updated"><p>' . sprintf(_n('%s previous order linked', '%s previous orders linked', $linked, 'woocommerce'), $linked) . '</p></div>';
     }
     if (!empty($_GET['refresh']) && wp_verify_nonce($_REQUEST['_wpnonce'], 'refresh')) {
         $user_id = absint($_GET['refresh']);
         $user = get_user_by('id', $user_id);
         delete_user_meta($user_id, '_money_spent');
         delete_user_meta($user_id, '_order_count');
         echo '<div class="updated"><p>' . sprintf(__('Refreshed stats for %s', 'woocommerce'), $user->display_name) . '</p></div>';
     }
     echo '<form method="post" id="woocommerce_customers">';
     $this->search_box(__('Search customers', 'woocommerce'), 'customer_search');
     $this->display();
     echo '</form>';
     echo '</div>';
 }
/**
 * @deprecated
 */
function woocommerce_update_new_customer_past_orders($customer_id)
{
    return wc_update_new_customer_past_orders($customer_id);
}