woocommerce_order_again_button

Display an 'order again' button on the view order page.

Description

woocommerce_order_again_button( (object) $order ); 

Parameters (1)

0. $order (object)
The order.

Usage

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

Defined (1)

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

/includes/wc-template-functions.php  
  1. function woocommerce_order_again_button( $order ) { 
  2. if ( ! $order || ! $order->has_status( 'completed' ) || ! is_user_logged_in() ) { 
  3. return; 
  4.  
  5. wc_get_template( 'order/order-again.php', array( 
  6. 'order' => $order,  
  7. ) );