WooCommerce – Redirect to checkout after add product to the cart

<?php
/**
* Add to cart redirect to checkout.
*
* @param string $url
* @return string
*/
function my_wc_add_to_cart_redirect_to_checkout( $url ) {
return wc_get_checkout_url();
}
add_filter( 'woocommerce_add_to_cart_redirect', 'my_wc_add_to_cart_redirect_to_checkout' );

view raw
functions.php
hosted with ❤ by GitHub

Um comentário sobre “WooCommerce – Redirect to checkout after add product to the cart

Os comentários estão desativados.