woocommerce_valid_order_statuses_for_order_again

woocommerce_valid_order_statuses_for_order_again

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.8.5

apply_filters('woocommerce_valid_order_statuses_for_order_again') is found 2 times:

  • /includes/class-wc-cart-session.php line 473
    		 * @since 3.6.0
    		 *
    		 * @param array $valid_statuses Array of valid order statuses.
    		 */
    		$valid_statuses = apply_filters( 'woocommerce_valid_order_statuses_for_order_again', array( OrderStatus::COMPLETED ) );
    		if ( ! $order->get_id() || ! $order->has_status( $valid_statuses ) || ! current_user_can( 'order_again', $order->get_id() ) ) {
    			return;
    		}
    
    		if ( apply_filters( 'woocommerce_empty_cart_when_order_again', true ) ) {
    			$cart = array();
    
  • /includes/wc-template-functions.php line 3012
    		 * @since 3.5.0
    		 *
    		 * @param array $statuses_for_reordering Array of valid order statuses for reordering.
    		 */
    		$statuses_for_reordering = apply_filters( 'woocommerce_valid_order_statuses_for_order_again', array( OrderStatus::COMPLETED ) );
    		if ( ! $order || ! $order->has_status( $statuses_for_reordering ) || ! is_user_logged_in() ) {
    			return;
    		}
    
    		wc_get_template(
    			'order/order-again.php',