We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2aa735a commit 6ff78e2Copy full SHA for 6ff78e2
includes/class-wc-form-handler.php
@@ -752,7 +752,7 @@ public static function add_to_cart_action( $url = false ) {
752
}
753
754
// If we added the product to the cart we can now optionally do a redirect.
755
- if ( 0 === $was_added_to_cart && wc_notice_count( 'error' ) ) {
+ if ( $was_added_to_cart && 0 === wc_notice_count( 'error' ) ) {
756
// If has custom URL redirect there
757
if ( $url = apply_filters( 'woocommerce_add_to_cart_redirect', $url ) ) {
758
wp_safe_redirect( $url );
0 commit comments