get_available_gateways(); $default = $helper->get_default_gateway(); $upgrades = $helper->get_recommended_gateways(); foreach ( $gateways as $gateway ) : $gateway = new $gateway; $is_active = $helper->is_active_gateway( $gateway->get_gateway_id() ); if ( $is_active ) { $action_url = esc_url( add_query_arg( array( 'charitable_action' => 'disable_gateway', 'gateway_id' => $gateway->get_gateway_id(), '_nonce' => wp_create_nonce( 'gateway' ), ), admin_url( 'admin.php?page=charitable-settings&tab=gateways' ) ) ); $action_text = __( 'Disable Gateway', 'charitable' ); } else { $action_url = esc_url( add_query_arg( array( 'charitable_action' => 'enable_gateway', 'gateway_id' => $gateway->get_gateway_id(), '_nonce' => wp_create_nonce( 'gateway' ), ), admin_url( 'admin.php?page=charitable-settings&tab=gateways' ) ) ); $action_text = __( 'Enable Gateway', 'charitable' ); } $action_url = esc_url( add_query_arg( array( 'charitable_action' => $is_active ? 'disable_gateway' : 'enable_gateway', 'gateway_id' => $gateway->get_gateway_id(), '_nonce' => wp_create_nonce( 'gateway' ), ), admin_url( 'admin.php?page=charitable-settings&tab=gateways' ) ) ); $make_default_url = esc_url( add_query_arg( array( 'charitable_action' => 'make_default_gateway', 'gateway_id' => $gateway->get_gateway_id(), '_nonce' => wp_create_nonce( 'gateway' ), ), admin_url( 'admin.php?page=charitable-settings&tab=gateways' ) ) ); ?>
get_all_currencies(); $gateway = key( $upgrades ); $message = sprintf( /* translators: %1$s: currency; %2$s: hyperlink %3$s: payment gateway name */ __( 'Tip: Accept donations in %1$s with %3$s.', 'charitable' ), $currencies[ charitable_get_currency() ], 'https://www.wpcharitable.com/extensions/charitable-' . $gateway . '/?utm_source=WordPress&utm_campaign=WP+Charitable&utm_medium=Upgrade+Notice&utm_content=Accept+Donations', current( $upgrades ) ); } else { $message = sprintf( /* translators: %1$s: hyperlink; %2$s: single extension name; %3$s: comma-separated list of extension names */ __( 'Need more options? Click here to browse our payment gateway extensions, including %3$s and %2$s.', 'charitable' ), 'https://www.wpcharitable.com/extensions/category/payment-gateways/?utm_source=WordPress&utm_campaign=WP+Charitable&utm_medium=Admin+Notice&utm_content=Need+More+Options+Browse+Gateway+Extensions', array_pop( $upgrades ), implode( ', ', $upgrades ) ); } ?>