cart->get_cart_id(); $cart = $this->cart->get_cart($cart_id); $empty = (count($cart) ? false : true); $free = $this->cart->is_free($cart); $gateways = $this->main->get_gateways(); $gateway_settings = $this->main->get_gateways_options(); $fees_disabled_gateways = isset( $this->settings['fees_disabled_gateways'] ) && is_array( $this->settings['fees_disabled_gateways'] ) ? $this->settings['fees_disabled_gateways'] : []; $total_fees_prices_for_disabled_gateways = []; $active_gateways = []; foreach($gateways as $gateway) { if(!$gateway->enabled()) continue; if(in_array($gateway->id, array(6, 7))) continue; // Stripe Connect & Pay By WooCommerce $active_gateways[] = $gateway; } // Javascript Code $javascript = ''; // Redirect Cart ID $redirect_cart_id = isset($_REQUEST['mec_stripe_redirect_cart_id']) ? $_REQUEST['mec_stripe_redirect_cart_id'] : ''; $redirect_message = ''; if(trim($redirect_cart_id)) { $redirect_message = get_option('mec_cart_'.$redirect_cart_id.'_message', ''); delete_option('mec_cart_'.$redirect_cart_id.'_message'); } // Include javascript code into the footer $this->factory->params('footer', $javascript); ?>