<?php

/**
 * Runs all the Freemius initialization code for FooConvert
 */
if ( !defined( 'ABSPATH' ) ) {
    exit;
}
if ( !function_exists( 'fooconvert_fs' ) ) {
    /**
     * Handles fs.
     */
    function fooconvert_fs() {
        global $fooconvert_fs;
        if ( !isset( $fooconvert_fs ) ) {
            // Activate multisite network integration.
            if ( !defined( 'WP_FS__PRODUCT_14677_MULTISITE' ) ) {
                define( 'WP_FS__PRODUCT_14677_MULTISITE', true );
            }
            $fooconvert_fs = fs_dynamic_init( array(
                'id'               => '14677',
                'slug'             => 'fooconvert',
                'type'             => 'plugin',
                'public_key'       => 'pk_88b6346482978e6778a77c484cfbe',
                'is_premium'       => false,
                'premium_suffix'   => 'PRO',
                'has_addons'       => false,
                'has_paid_plans'   => true,
                'has_affiliation'  => 'selected',
                'trial'            => array(
                    'days'               => 7,
                    'is_require_payment' => false,
                ),
                'menu'             => array(
                    'slug'    => 'fooconvert',
                    'support' => false,
                ),
                'is_live'          => true,
                'is_org_compliant' => true,
            ) );
        }
        return $fooconvert_fs;
    }

    // Init Freemius.
    fooconvert_fs();
    // Signal that SDK was initiated.
    do_action( 'fooconvert_fs_loaded' );
    fooconvert_fs()->add_filter(
        'plugin_icon',
        function ( $icon ) {
            return FOOCONVERT_ASSETS_PATH . 'media/icon.png';
        },
        10,
        1
    );
    fooconvert_fs()->add_filter( 'show_affiliate_program_notice', '__return_false' );
}