<?php
/**
 * AVI_VERSION: 9.0.3 | appsumo-redeem.php | 2026-05-09
 */
defined( 'ABSPATH' ) || exit;
$avi_lang = 'en';
if ( function_exists( 'avi_get_current_lang' ) ) { $avi_lang = avi_get_current_lang(); }
if ( $avi_lang === 'en' && isset( $_SERVER['REQUEST_URI'] ) ) {
    $req = $_SERVER['REQUEST_URI'];
    if ( strpos( $req, '/fr/' ) === 0 ) { $avi_lang = 'fr'; }
    elseif ( strpos( $req, '/es/' ) === 0 ) { $avi_lang = 'es'; }
}
if ( $avi_lang !== 'en' ) { set_query_var( 'avi_lang', $avi_lang ); }
$is_fr = ( $avi_lang === 'fr' );
$is_es = ( $avi_lang === 'es' );

if ( ! class_exists( 'Avision_Page_Template' ) ) {
    require_once AVISION_PLUGIN_DIR . 'includes/class-avision-page-template.php';
}

$hero_args = array(
    'badge'    => 'AppSumo',
    'title'    => 'Activate your Lifetime Deal.',
    'subtitle' => 'Enter your AppSumo code below to unlock your Avision access.',
    'align'    => 'center',
    'size'     => 'small',
);

Avision_Page_Template::render( 'appsumo-redeem', $hero_args, static function() {
?>
<section class="avi-appsumo-page">
    <div class="avi-container" style="max-width:680px;padding:48px 24px 80px;">
        <?php echo do_shortcode( '[avision_appsumo_redeem]' ); ?>
    </div>
</section>
<?php
} );

