How to on/off woocommerce filter with redux framework [closed]

Just add redux global variable between funtion

  add_filter ('add_to_cart_redirect', 'redirect_to_checkout');
        function redirect_to_checkout() {
         global $xpanel;   if ( isset( $xpanel['woo-option'] ) && $xpanel['woo-option'] == TRUE ) {
        global $woocommerce;
        $checkout_url = $woocommerce->cart->get_checkout_url();
        return $checkout_url;

        }
    } 

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