woocommerce_cart_redirect_after_error filter-hook . WC 1.0
If there was an error adding to the cart, redirect to the product page to show any errors.
Usage
add_filter( 'woocommerce_cart_redirect_after_error', 'filter_function_name_5472', 10, 2 ); function filter_function_name_5472( $permalink, $product_id ){ // filter... return $permalink; }
- $permalink
- -
- $product_id
- -
Where the hook is called
woocommerce_cart_redirect_after_error
woocommerce/includes/class-wc-ajax.php 436
'product_url' => apply_filters( 'woocommerce_cart_redirect_after_error', get_permalink( $product_id ), $product_id ),