Created
July 23, 2024 12:30
-
-
Save xlplugins/af31a7ffcab9ecf769b66ab8a7f47db2 to your computer and use it in GitHub Desktop.
Funnelkit Cart: Prevent Redirect Issue after add to cart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FKCART_Prevent_Redirect_Issue { | |
public function __construct() { | |
add_filter('woocommerce_add_to_cart_product_id',function($product_id){ | |
if ( function_exists( 'resolve_dupes_add_to_cart_redirect' ) ) { | |
remove_action( 'add_to_cart_redirect', 'resolve_dupes_add_to_cart_redirect' ); | |
} | |
return $product_id; | |
}); | |
} | |
} | |
new FKCART_Prevent_Redirect_Issue(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment