/** * Woocommerce redirect to checkout after add to cart */ add_filter( 'woocommerce_add_to_cart_redirect', 'barbareshet_skip_cart_redirect_checkout' ); function barbareshet_skip_cart_redirect_checkout( $url ) { return wc_get_checkout_url(); }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter