redirect-add-to-cart.php(file created)
@@ -0,0 +1,6 @@ | |||
1 | + | // for easycut.es | |
2 | + | ||
3 | + | function custom_redirect_to_cart_after_add_to_cart() { | |
4 | + | return wc_get_cart_url(); // Gets the URL of the cart page and redirects to it | |
5 | + | } | |
6 | + | add_filter('woocommerce_add_to_cart_redirect', 'custom_redirect_to_cart_after_add_to_cart'); |
更新
更早