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.3.3

apply_filters('woocommerce_valid_order_statuses_for_order_again') is found 2 times:

  • /includes/class-wc-cart-session.php line 443
    	 */
    	private function populate_cart_from_order( $order_id, $cart ) {
    		$order = wc_get_order( $order_id );
    
    		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() ) ) {
    			return;
    		}
    
    		if ( apply_filters( 'woocommerce_empty_cart_when_order_again', true ) ) {
    			$cart = array();
    		}
    
  • /includes/wc-template-functions.php line 2801
    	 *
    	 * @param object $order Order.
    	 */
    	function woocommerce_order_again_button( $order ) {
    		if ( ! $order || ! $order->has_status( apply_filters( 'woocommerce_valid_order_statuses_for_order_again', array( 'completed' ) ) ) || ! is_user_logged_in() ) {
    			return;
    		}
    
    		wc_get_template(
    			'order/order-again.php',
    			array(