Hello @pavlito ,
Thanks for reaching out to us.
You can redirect to checkout page after clicking add to cart button. To do that you have to add the below code in your theme’s function.php file.
add_filter('woocommerce_add_to_cart_redirect', 'skip_cart_redirect_to_checkout');
function skip_cart_redirect_to_checkout($url) {
$url = wc_get_checkout_url(); // Get WooCommerce checkout URL
return $url;
}
I hope it will solve your requirement as expected. If you encounter any further problems, then let us know.
Your regards,
Sunjida
Hello @pavlito,
Yes, it’s possible to have a direct checkout option where the user can skip the cart when purchasing a course.
To achieve this, you can use the function above or use the Direct Checkout for WooCommerce plugin.
You can download and install the plugin from the following link:
https://wordpress.org/plugins/woocommerce-direct-checkout/