How to Disable REST API Access for Gue...
Learn how to disable the REST API in your WordPress site for logged-out users and bui...

WPCodeBox
747
After adding a product to the cart, automatically redirect customers to the checkout page in WooCommerce. This snippet is useful for stores selling a single product or streamlining the purchase process.
<?php
add_filter ('add_to_cart_redirect', function () {
global $woocommerce;
return $woocommerce->cart->get_checkout_url();
});





