WooCommerce skip cart doesn’t work as a snippet
-
I’ve moving some functions from functions.php to WPCode Snippets and this one stops working – any hints?
Using everywhere placement.// Skip cart - straight to checkout
add_filter('add_to_cart_redirect', obs_skip_cart_page');
function obs_skip_cart_page () {
global $woocommerce;
$redirect_checkout = $woocommerce->cart->get_checkout_url();
return $redirect_checkout;
}Also is there a troubleshooting gudie somewhere that would help me troubleshoot it myself? – like with steps for “if it works in functions.php but not as a snippet then it could be one of these issues”
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘WooCommerce skip cart doesn’t work as a snippet’ is closed to new replies.