woocommerce_account_view_order

My Account > View order template.

Description

woocommerce_account_view_order( (int) $order_id ); 

Parameters (1)

0. $order_id (int)
The order id.

Usage

  1. if ( !function_exists( 'woocommerce_account_view_order' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-template-functions.php'; 
  3.  
  4. // The order id. 
  5. $order_id = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = woocommerce_account_view_order($order_id); 
  9.  

Defined (1)

The function is defined in the following location(s).

/includes/wc-template-functions.php  
  1. function woocommerce_account_view_order( $order_id ) { 
  2. WC_Shortcode_My_Account::view_order( absint( $order_id ) );