From 1b5d494866d99439c24ebd1d5891bf45cd994efd Mon Sep 17 00:00:00 2001 From: Vova Feldman Date: Wed, 15 Feb 2017 10:12:21 -0500 Subject: [PATCH 1/2] Pull php version from both 'php_version' or 'programming_language_version'. --- includes/migration/wc/class-fs-wc-migration.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/migration/wc/class-fs-wc-migration.php b/includes/migration/wc/class-fs-wc-migration.php index 80d5c65..4e3d071 100644 --- a/includes/migration/wc/class-fs-wc-migration.php +++ b/includes/migration/wc/class-fs-wc-migration.php @@ -704,7 +704,9 @@ protected function get_install_for_api( $license_id ) { $install['language'] = $this->_edd_install_data['language']; $install['charset'] = $this->_edd_install_data['charset']; $install['platform_version'] = $this->_edd_install_data['platform_version']; - $install['programming_language_version'] = $this->_edd_install_data['php_version']; + $install['programming_language_version'] = !empty($this->_edd_install_data['php_version']) ? + $this->_edd_install_data['php_version'] : + $this->_edd_install_data['programming_language_version']; $install['license_id'] = $license_id; $install_at = $this->ep->order->_purchase_time; From dad1edb14c6e095153f19eb68bd774d3429692a1 Mon Sep 17 00:00:00 2001 From: Vova Feldman Date: Wed, 15 Feb 2017 10:14:50 -0500 Subject: [PATCH 2/2] Don't require 'php_version', instead require one of the two 'php_version' or 'programming_language_version'. --- .../migration/class-fs-migration-endpoint-abstract.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/includes/migration/class-fs-migration-endpoint-abstract.php b/includes/migration/class-fs-migration-endpoint-abstract.php index 0ea313e..343051f 100644 --- a/includes/migration/class-fs-migration-endpoint-abstract.php +++ b/includes/migration/class-fs-migration-endpoint-abstract.php @@ -637,9 +637,15 @@ protected function validate_all_params() { 'language', 'charset', 'platform_version', - 'php_version', ) ); + if ( ! isset( $this->_request_data[ 'php_version' ] ) && + ! isset( $this->_request_data[ 'programming_language_version' ] ) + ) { + $this->require_params( array( 'programming_language_version' ) ); + } + + $this->require_non_empty_params( array( // License key. 'license_key', @@ -970,4 +976,4 @@ abstract protected function local_to_remote_module( $local_module ); * @throws FS_Endpoint_Exception */ abstract protected function migrate_install_license(); - } \ No newline at end of file + }