Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WooCommerce Snippet Weiterleitung direkt zur WooCommerce Kasse
/**
* Weiterleitung direkt zur WooCommerce Kasse
*/
function my_custom_add_to_cart_redirect( $url ) {
$url = WC()->cart->get_checkout_url();
// $url = wc_get_checkout_url(); // seit WooCommerce 2.5 return $url;
}
add_filter( 'woocommerce_add_to_cart_redirect', 'my_custom_add_to_cart_redirect' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment