5 ), $atts)); $recent_orders = ('all' == $recent_orders) ? -1 : $recent_orders; global $post, $current_user; get_currentuserinfo(); woocommerce::show_messages(); if (is_user_logged_in()) : ?>

%s. From your account dashboard you can view your recent orders, manage your shipping and billing addresses and change your password.', 'woothemes'), $current_user->display_name, get_permalink(get_option('woocommerce_change_password_page_id'))); ?>

get_customer_orders( get_current_user_id(), $recent_orders ); if ($woocommerce_orders->orders) foreach ($woocommerce_orders->orders as $order) : ?>
id; ?>
formatted_shipping_address) echo $order->formatted_shipping_address; else echo '–'; ?>
order_total); ?> status; ?> status=='pending') : ?>

countries[get_user_meta( get_current_user_id(), 'billing-country', true )])) $country = woocommerce_countries::$countries->countries[get_user_meta( get_current_user_id(), 'billing-country', true )]; else $country = ''; $address = array( get_user_meta( get_current_user_id(), 'billing-first_name', true ) . ' ' . get_user_meta( get_current_user_id(), 'billing-last_name', true ) ,get_user_meta( get_current_user_id(), 'billing-company', true ) ,get_user_meta( get_current_user_id(), 'billing-address', true ) ,get_user_meta( get_current_user_id(), 'billing-address-2', true ) ,get_user_meta( get_current_user_id(), 'billing-city', true ) ,get_user_meta( get_current_user_id(), 'billing-state', true ) ,get_user_meta( get_current_user_id(), 'billing-postcode', true ) ,$country ); $address = array_map('trim', $address); $formatted_address = array(); foreach ($address as $part) if (!empty($part)) $formatted_address[] = $part; $formatted_address = implode(', ', $formatted_address); if (!$formatted_address) _e('You have not set up a billing address yet.', 'woothemes'); else echo $formatted_address; ?>

countries[get_user_meta( get_current_user_id(), 'shipping-country', true )])) $country = woocommerce_countries::$countries->countries[get_user_meta( get_current_user_id(), 'shipping-country', true )]; else $country = ''; $address = array( get_user_meta( get_current_user_id(), 'shipping-first_name', true ) . ' ' . get_user_meta( get_current_user_id(), 'shipping-last_name', true ) ,get_user_meta( get_current_user_id(), 'shipping-company', true ) ,get_user_meta( get_current_user_id(), 'shipping-address', true ) ,get_user_meta( get_current_user_id(), 'shipping-address-2', true ) ,get_user_meta( get_current_user_id(), 'shipping-city', true ) ,get_user_meta( get_current_user_id(), 'shipping-state', true ) ,get_user_meta( get_current_user_id(), 'shipping-postcode', true ) ,$country ); $address = array_map('trim', $address); $formatted_address = array(); foreach ($address as $part) if (!empty($part)) $formatted_address[] = $part; $formatted_address = implode(', ', $formatted_address); if (!$formatted_address) _e('You have not set up a shipping address yet.', 'woothemes'); else echo $formatted_address; ?>
0 && woocommerce::verify_nonce('edit_address') && woocommerce::error_count() == 0 ) : update_user_meta( $user_id, $load_address . '-first_name', $_POST['address-first_name'] ); update_user_meta( $user_id, $load_address . '-last_name', $_POST['address-last_name'] ); update_user_meta( $user_id, $load_address . '-company', $_POST['address-company'] ); update_user_meta( $user_id, $load_address . '-email', $_POST['address-email'] ); update_user_meta( $user_id, $load_address . '-address', $_POST['address-address'] ); update_user_meta( $user_id, $load_address . '-address2', $_POST['address-address2'] ); update_user_meta( $user_id, $load_address . '-city', $_POST['address-city'] ); update_user_meta( $user_id, $load_address . '-postcode', $_POST['address-postcode'] ); update_user_meta( $user_id, $load_address . '-country', $_POST['address-country'] ); update_user_meta( $user_id, $load_address . '-state', $_POST['address-state'] ); update_user_meta( $user_id, $load_address . '-phone', $_POST['address-phone'] ); update_user_meta( $user_id, $load_address . '-fax', $_POST['address-fax'] ); wp_safe_redirect( get_permalink(get_option('woocommerce_myaccount_page_id')) ); exit; else : $address = array( 'first_name' => $_POST['address-first_name'], 'last_name' => $_POST['address-last_name'], 'company' => $_POST['address-company'], 'email' => $_POST['address-email'], 'phone' => $_POST['address-phone'], 'fax' => $_POST['address-fax'], 'address' => $_POST['address-address'], 'address2' => $_POST['address-address2'], 'city' => $_POST['address-city'], 'state' => $_POST['address-state'], 'postcode' => $_POST['address-postcode'], 'country' => $_POST['address-country'] ); endif; else : $address = array( 'first_name' => get_user_meta( get_current_user_id(), $load_address . '-first_name', true ), 'last_name' => get_user_meta( get_current_user_id(), $load_address . '-last_name', true ), 'company' => get_user_meta( get_current_user_id(), $load_address . '-company', true ), 'email' => get_user_meta( get_current_user_id(), $load_address . '-email', true ), 'phone' => get_user_meta( get_current_user_id(), $load_address . '-phone', true ), 'fax' => get_user_meta( get_current_user_id(), $load_address . '-fax', true ), 'address' => get_user_meta( get_current_user_id(), $load_address . '-address', true ), 'address2' => get_user_meta( get_current_user_id(), $load_address . '-address2', true ), 'city' => get_user_meta( get_current_user_id(), $load_address . '-city', true ), 'state' => get_user_meta( get_current_user_id(), $load_address . '-state', true ), 'postcode' => get_user_meta( get_current_user_id(), $load_address . '-postcode', true ), 'country' => get_user_meta( get_current_user_id(), $load_address . '-country', true ) ); endif; woocommerce::show_messages(); ?>

0 && woocommerce::verify_nonce('change_password')) : if ( $_POST['password-1'] && $_POST['password-2'] ) : if ( $_POST['password-1']==$_POST['password-2'] ) : wp_update_user( array ('ID' => $user_id, 'user_pass' => $_POST['password-1']) ) ; wp_safe_redirect( get_permalink(get_option('woocommerce_myaccount_page_id')) ); exit; else : woocommerce::add_error( __('Passwords do not match.', 'woothemes') ); endif; else : woocommerce::add_error( __('Please enter your password.', 'woothemes') ); endif; endif; endif; woocommerce::show_messages(); ?>

0 && $order->user_id == get_current_user_id() ) : echo '

' . sprintf( __('Order #%s made on %s', 'woothemes'), $order->id, date(get_option('date_format'), strtotime($order->order_date)) ); echo sprintf( __('. Order status: %s', 'woothemes'), $order->status ); echo '.

'; ?> order_shipping>0) : ?>get_total_tax()>0) : ?>order_discount>0) : ?>customer_note) : ?> items)>0) : foreach($order->items as $item) : if (isset($item['variation_id']) && $item['variation_id'] > 0) : $_product = &new woocommerce_product_variation( $item['variation_id'] ); else : $_product = &new woocommerce_product( $item['id'] ); endif; echo ' '; endforeach; endif; ?>
get_subtotal_to_display(); ?>
get_shipping_to_display(); ?>
get_total_tax()); ?>
-order_discount); ?>
order_total); ?>
customer_note)); ?>
'.$item['name']; if (isset($_product->variation_data)) : echo woocommerce_get_formatted_variation( $_product->variation_data ); endif; echo ' '.$item['qty'].' '.woocommerce_price( $item['cost']*$item['qty'], array('ex_tax_label' => 1) ).'

billing_email) echo '
'.__('Email:', 'woothemes').'
'.$order->billing_email.'
'; if ($order->billing_phone) echo '
'.__('Telephone:', 'woothemes').'
'.$order->billing_phone.'
'; ?>

formatted_shipping_address) _e('N/A', 'woothemes'); else echo $order->formatted_shipping_address; ?>

formatted_billing_address) _e('N/A', 'woothemes'); else echo $order->formatted_billing_address; ?>