Exemple #1
0
 /**
  * Test wc_get_account_orders_query_args().
  *
  * @since 2.6.0
  */
 public function test_wc_get_account_orders_query_args()
 {
     $this->assertEquals(array('posts_per_page' => 15, 'meta_key' => '_customer_user', 'meta_value' => get_current_user_id(), 'post_type' => wc_get_order_types('view-orders'), 'post_status' => array_keys(wc_get_order_statuses())), wc_get_account_orders_query_args());
 }
Exemple #2
0
 *
 * HOWEVER, on occasion WooCommerce will need to update template files and you
 * (the theme developer) will need to copy the new files to your theme to
 * maintain compatibility. We try to do this as little as possible, but it does
 * happen. When this occurs the version of the template file will be bumped and
 * the readme will list any important changes.
 *
 * @see 	http://docs.woothemes.com/document/template-structure/
 * @author  WooThemes
 * @package WooCommerce/Templates
 * @version 2.6.0
 */
if (!defined('ABSPATH')) {
    exit;
}
$customer_orders = new WP_Query(wc_get_account_orders_query_args($current_page));
$has_orders = $customer_orders->have_posts();
wc_print_notices();
wc_get_template('myaccount/navigation.php');
?>

<div class="my-account-content">

	<?php 
do_action('woocommerce_before_account_orders', $has_orders);
?>

	<?php 
if ($has_orders) {
    ?>