Support

Account

Home Forums ACF PRO ACF Pro 5.5.0 Reply To: ACF Pro 5.5.0

  • function wpa__prelicense() {
        if( function_exists('acf_pro_is_license_active') && !acf_pro_is_license_active() ) {
            $args = array(
                '_nonce'        => wp_create_nonce('activate_pro_licence'),
                'acf_license'    => base64_encode('MY_LICENSE_STRING'),
                'acf_version'    => acf_get_setting('version'),
                'wp_name'        => get_bloginfo('name'),
                'wp_url'        => home_url(),
                'wp_version'    => get_bloginfo('version'),
                'wp_language'    => get_bloginfo('language'),
                'wp_timezone'    => get_option('timezone_string'),
            );
    
            $response = acf_pro_get_remote_response( 'activate-license', $args );
            $response = json_decode($response, true);
            if( $response['status'] == 1 ) {
                acf_pro_update_license($response['license']);
            }
        }
    }
    add_action( 'after_setup_theme', 'wpa__prelicense' );

    That code worked before an update to 5.5.0 & error are visible with qTranslate, when I changed the language to NOT default.

    You can see error here http://trachuk.dev0.site/en/