<commit_before><?php
	/**
	 * @package     Freemius Migration
	 * @copyright   Copyright (c) 2016, Freemius, Inc.
	 * @license     http://opensource.org/licenses/gpl-2.0.php GNU Public License
	 * @since       1.0.0
	 */

	if ( ! defined( 'ABSPATH' ) ) {
		exit;
	}

	/**
	 * Assumptions:
	 *  - Currently assumes that the download is a PLUGIN, not a THEME.
	 *
	 * Class FS_EDD_Download_Migration
	 */
	class FS_EDD_Download_Migration extends FS_Module_Migration_Abstract {
		/**
		 * @var EDD_Download
		 */
		private $_edd_download;

		/**
		 * @var array<int,array<string,mixed>>
		 */
		private $_edd_prices = array();

		/**
		 * @var int
		 */
		private $_edd_free_price_id;

		/**
		 * @var bool
		 */
		private $_edd_has_paid_plan = false;

		/**
		 * @var array
		 */
		private $_edd_paid_plan_pricing = array();

		#--------------------------------------------------------------------------------
		#region Init
		#--------------------------------------------------------------------------------

		function __construct(
			FS_Developer $developer,
			$module,
			EDD_Download $download
		) {
			$this->init( WP_FS__NAMESPACE_EDD, $developer, $module );

			$this->_edd_download = $download;

			if ( $download->has_variable_prices() ) {
				$this->_edd_prices = $download->get_prices();
			} else {
				if ( class_exists( 'EDD_Recurring' ) ) {
					$recurring = EDD_Recurring::is_recurring( $download->ID );
					$period    = EDD_Recurring::get_period_single( $download->ID );
				} else {
					$recurring = false;
					$period    = 'never';
				}

				$this->_edd_prices = array(
					// Set the EDD price ID as ZERO when the download doesn't have variable prices.
					0 => array(
						'recurring'     => $recurring ? 'yes' : 'no',
						'period'        => $period,
						'license_limit' => 0,
						'amount'        => $download->get_price(),
					)
				);
			}<commit_msg>[license-limit] Apparently even if user isn't using variable prices, there's a special section to configure the license limits for the product. Pull that number.<commit_after><?php
	/**
	 * @package     Freemius Migration
	 * @copyright   Copyright (c) 2016, Freemius, Inc.
	 * @license     http://opensource.org/licenses/gpl-2.0.php GNU Public License
	 * @since       1.0.0
	 */

	if ( ! defined( 'ABSPATH' ) ) {
		exit;
	}

	/**
	 * Assumptions:
	 *  - Currently assumes that the download is a PLUGIN, not a THEME.
	 *
	 * Class FS_EDD_Download_Migration
	 */
	class FS_EDD_Download_Migration extends FS_Module_Migration_Abstract {
		/**
		 * @var EDD_Download
		 */
		private $_edd_download;

		/**
		 * @var array<int,array<string,mixed>>
		 */
		private $_edd_prices = array();

		/**
		 * @var int
		 */
		private $_edd_free_price_id;

		/**
		 * @var bool
		 */
		private $_edd_has_paid_plan = false;

		/**
		 * @var array
		 */
		private $_edd_paid_plan_pricing = array();

		#--------------------------------------------------------------------------------
		#region Init
		#--------------------------------------------------------------------------------

		function __construct(
			FS_Developer $developer,
			$module,
			EDD_Download $download
		) {
			$this->init( WP_FS__NAMESPACE_EDD, $developer, $module );

			$this->_edd_download = $download;

			if ( $download->has_variable_prices() ) {
				$this->_edd_prices = $download->get_prices();
			} else {
				if ( class_exists( 'EDD_Recurring' ) ) {
					$recurring = EDD_Recurring::is_recurring( $download->ID );
					$period    = EDD_Recurring::get_period_single( $download->ID );
				} else {
					$recurring = false;
					$period    = 'never';
				}

				$license_limit = get_post_meta( $download->ID, '_edd_sl_limit', true );

				$this->_edd_prices = array(
					// Set the EDD price ID as ZERO when the download doesn't have variable prices.
					0 => array(
						'recurring'     => $recurring ? 'yes' : 'no',
						'period'        => $period,
						'license_limit' => is_numeric( $license_limit ) ? $license_limit : 0,
						'amount'        => $download->get_price(),
					)
				);
			}
{'fraction_non_alphanumeric': 0.20894047913064953, 'fraction_numerical': 0.005433440355643368, 'mean_word_length': 2.0405405405405403, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 36, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 33, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5524608', 'n_tokens_mistral': 1601, 'n_tokens_neox': 1292, 'n_words': 279}