WooCommerce : Direct Checkout Page [closed]

My friend Ewout just answered this question a couple months ago on stackoverflow. Add the following to your theme’s functions.php file:

add_filter ('add_to_cart_redirect', 'redirect_to_checkout');

function redirect_to_checkout() {
    global $woocommerce;
    $checkout_url = $woocommerce->cart->get_checkout_url();
    return $checkout_url;
}

Here’s a link to his answer: https://stackoverflow.com/a/15597933/1543310

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)