woocommerce_cart_redirect_after_error

woocommerce_cart_redirect_after_error

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

See hook in core

Displaying hooks found in version: woocommerce.9.3.3

apply_filters('woocommerce_cart_redirect_after_error') is found 1 times:

  • /includes/class-wc-ajax.php line 491
     
    			// If there was an error adding to the cart, redirect to the product page to show any errors.
    			$data = array(
    				'error'       => true,
    				'product_url' => apply_filters( 'woocommerce_cart_redirect_after_error', get_permalink( $product_id ), $product_id ),
    			);
    
    			wp_send_json( $data );
    		}
    		// phpcs:enable
    	}