woocommerce_valid_order_statuses_for_order_again filter-hookWC 1.0

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

Usage

add_filter( 'woocommerce_valid_order_statuses_for_order_again', 'wp_kama_woocommerce_valid_order_statuses_for_again_filter' );

/**
 * Function for `woocommerce_valid_order_statuses_for_order_again` filter-hook.
 * 
 * @param object $order Order.
 *
 * @return object
 */
function wp_kama_woocommerce_valid_order_statuses_for_again_filter( $order ){

	// filter...
	return $order;
}
$order(object)
Order.

Where the hook is called

woocommerce_order_again_button()
woocommerce_valid_order_statuses_for_order_again
WC_Cart_Session::populate_cart_from_order()
woocommerce_valid_order_statuses_for_order_again
woocommerce/includes/wc-template-functions.php 2712
if ( ! $order || ! $order->has_status( apply_filters( 'woocommerce_valid_order_statuses_for_order_again', array( 'completed' ) ) ) || ! is_user_logged_in() ) {
woocommerce/includes/class-wc-cart-session.php 355
if ( ! $order->get_id() || ! $order->has_status( apply_filters( 'woocommerce_valid_order_statuses_for_order_again', array( 'completed' ) ) ) || ! current_user_can( 'order_again', $order->get_id() ) ) {

Where the hook is used in WooCommerce

Usage not found.