From dc4f86ce9de0a3e1e6fd552fdcf9a34ec0504fdc Mon Sep 17 00:00:00 2001 From: Todd Lahman Date: Mon, 24 Aug 2020 18:04:04 -0700 Subject: [PATCH] Bump to 2.7.3 --- README.md | 10 +- changelog.txt | 5 + readme.txt | 10 +- wc-am-client.php | 211 +++++++++++++-------------------- wc-api-manager-php-library.php | 14 +-- 5 files changed, 102 insertions(+), 148 deletions(-) diff --git a/README.md b/README.md index 2752d61..1b9ac7e 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Requirements WooCommerce API Manager 2.x. -WC API Manager PHP Library version 2.7 +WC API Manager PHP Library version 2.7.x ========================== This library can be dropped into a WordPress plugin or theme to activate/deactivate API Keys, to check for Software updates, and check an API Key's status with the **WooCommerce API Manager**. @@ -36,7 +36,7 @@ Example Code to add to Plugins and Themes */ // Load WC_AM_Client class if it exists. -if ( ! class_exists( 'WC_AM_Client_2_7_2' ) ) { +if ( ! class_exists( 'WC_AM_Client_2_7_3' ) ) { // Uncomment next line if this is a plugin require_once( plugin_dir_path( __FILE__ ) . 'wc-am-client.php' ); @@ -45,7 +45,7 @@ if ( ! class_exists( 'WC_AM_Client_2_7_2' ) ) { } // Instantiate WC_AM_Client class object if the WC_AM_Client class is loaded. -if ( class_exists( 'WC_AM_Client_2_7_2' ) ) { +if ( class_exists( 'WC_AM_Client_2_7_3' ) ) { /** * This file is only an example that includes a plugin header, and this code used to instantiate the client object. The variable $wcam_lib * can be used to access the public properties from the WC_AM_Client class, but $wcam_lib must have a unique name. To find data saved by @@ -72,10 +72,10 @@ if ( class_exists( 'WC_AM_Client_2_7_2' ) ) { */ // Example of empty string product_id. - //$wcam_lib = new WC_AM_Client_2_7_2( __FILE__, '', '1.0', 'plugin', 'http://wc/', 'Simple Comments - Simple' ); + //$wcam_lib = new WC_AM_Client_2_7_3( __FILE__, '', '1.0', 'plugin', 'http://wc/', 'Simple Comments - Simple' ); // Preferred positive integer product_id. - $wcam_lib = new WC_AM_Client_2_7_2( __FILE__, 132967, '1.0', 'plugin', 'http://wc/', 'Simple Comments - Simple' ); + $wcam_lib = new WC_AM_Client_2_7_3( __FILE__, 132967, '1.0', 'plugin', 'http://wc/', 'Simple Comments - Simple' ); } ``` diff --git a/changelog.txt b/changelog.txt index 7398061..ca97479 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,10 @@ *** WooCommerce API Manager PHP Library for Plugins and Themes Changelog *** +2020.08.24 - version 2.7.3 + * Tweak: Minor code improvements/revisions. + * Tweak: Removed pre 2.0 migration code. + * Fix: Fixed a few PHP warnings. + 2019.11.29 - version 2.7.2 * Tweak: Make migration failure instructions more detailed and specific to plugin or theme. * Tweak: Format 'plugin' or 'theme' string to lower case to insure proper string format. diff --git a/readme.txt b/readme.txt index a091298..9c8666c 100644 --- a/readme.txt +++ b/readme.txt @@ -8,7 +8,7 @@ Requirements WooCommerce API Manager 2.x. -WC API Manager PHP Library version 2.7 +WC API Manager PHP Library version 2.7.x ========================== This library can be dropped into a WordPress plugin or theme to activate/deactivate API Keys, to check for Software updates, and check an API Key's status with the **WooCommerce API Manager**. @@ -36,7 +36,7 @@ Example Code to add to Plugins and Themes */ // Load WC_AM_Client class if it exists. -if ( ! class_exists( 'WC_AM_Client_2_7_2' ) ) { +if ( ! class_exists( 'WC_AM_Client_2_7_3' ) ) { // Uncomment next line if this is a plugin require_once( plugin_dir_path( __FILE__ ) . 'wc-am-client.php' ); @@ -45,7 +45,7 @@ if ( ! class_exists( 'WC_AM_Client_2_7_2' ) ) { } // Instantiate WC_AM_Client class object if the WC_AM_Client class is loaded. -if ( class_exists( 'WC_AM_Client_2_7_2' ) ) { +if ( class_exists( 'WC_AM_Client_2_7_3' ) ) { /** * This file is only an example that includes a plugin header, and this code used to instantiate the client object. The variable $wcam_lib * can be used to access the public properties from the WC_AM_Client class, but $wcam_lib must have a unique name. To find data saved by @@ -72,10 +72,10 @@ if ( class_exists( 'WC_AM_Client_2_7_2' ) ) { */ // Example of empty string product_id. - //$wcam_lib = new WC_AM_Client_2_7_2( __FILE__, '', '1.0', 'plugin', 'http://wc/', 'Simple Comments - Simple' ); + //$wcam_lib = new WC_AM_Client_2_7_3( __FILE__, '', '1.0', 'plugin', 'http://wc/', 'Simple Comments - Simple' ); // Preferred positive integer product_id. - $wcam_lib = new WC_AM_Client_2_7_2( __FILE__, 132967, '1.0', 'plugin', 'http://wc/', 'Simple Comments - Simple' ); + $wcam_lib = new WC_AM_Client_2_7_3( __FILE__, 132967, '1.0', 'plugin', 'http://wc/', 'Simple Comments - Simple' ); } ``` diff --git a/wc-am-client.php b/wc-am-client.php index f0634dc..4784852 100644 --- a/wc-am-client.php +++ b/wc-am-client.php @@ -8,7 +8,7 @@ * but are not limited to, the working concept, function, and behavior of this software, * the logical code structure and expression as written. * - * @version 2.7.2 + * @version 2.7.3 * @author Todd Lahman LLC https://www.toddlahman.com/ * @copyright Copyright (c) Todd Lahman LLC (support@toddlahman.com) * @package WooCommerce API Manager plugin and theme library @@ -17,8 +17,8 @@ defined( 'ABSPATH' ) || exit; -if ( ! class_exists( 'WC_AM_Client_2_7_2' ) ) { - class WC_AM_Client_2_7_2 { +if ( ! class_exists( 'WC_AM_Client_2_7_3' ) ) { + class WC_AM_Client_2_7_3 { /** * Class args @@ -63,7 +63,7 @@ class WC_AM_Client_2_7_2 { public $wc_am_software_version = ''; public function __construct( $file, $product_id, $software_version, $plugin_or_theme, $api_url, $software_title = '', $text_domain = '' ) { - $this->no_product_id = empty( $product_id ) ? true : false; + $this->no_product_id = empty( $product_id ); $this->plugin_or_theme = esc_attr( strtolower( $plugin_or_theme ) ); if ( $this->no_product_id ) { @@ -150,9 +150,6 @@ public function __construct( $file, $product_id, $software_version, $plugin_or_t $this->wc_am_domain = str_ireplace( array( 'http://', 'https://' ), '', home_url() ); // blog domain name $this->wc_am_software_version = $this->software_version; // The software version - // Check if data has been migrated from pre-2.0. - $this->migrate_pre_2_0_data( $product_id, $software_title ); - /** * Check for software updates */ @@ -175,65 +172,6 @@ public function __construct( $file, $product_id, $software_version, $plugin_or_t } } - /** - * Migrates pre 2.0 data to prevent breaking old software activations. - * - * @since 2.0 - * - * @param int $product_id - * @param string $software_title - */ - public function migrate_pre_2_0_data( $product_id, $software_title ) { - $upraded_postfix = strtolower( str_ireplace( array( ' ', '_', '&', '?', '-' ), '_', $product_id ) ); - $upraded = get_option( 'wc_client_20_ugrade_attempt_' . $upraded_postfix ); - - if ( $upraded != 'yes' ) { - $title = is_int( $product_id ) ? strtolower( $software_title ) : strtolower( $product_id ); - $title = str_ireplace( array( ' ', '_', '&', '?' ), '_', $title ); - $old_data_key = $title . '_data'; - $data = get_option( $old_data_key ); - $instance = get_option( $title . '_instance' ); - - if ( ! empty( $data ) && ! empty( $instance ) ) { - $api_key = array( - $this->wc_am_api_key_key => $data[ 'api_key' ], - ); - - update_option( $this->data_key, $api_key ); - update_option( $this->wc_am_instance_key, $instance ); - ! empty( $instance ) ? update_option( $this->wc_am_deactivate_checkbox_key, 'off' ) : update_option( $this->wc_am_deactivate_checkbox_key, 'on' ); - ! empty( $instance ) ? update_option( $this->wc_am_activated_key, 'Activated' ) : update_option( $this->wc_am_activated_key, 'Deactivated' ); - // Success! - update_option( 'wc_client_20_ugrade_attempt_' . $upraded_postfix, 'yes' ); - } else { - if ( empty( $this->wc_am_instance_id ) ) { - // Failed migration. :( Cue the violins to play a sad song. - add_action( 'admin_notices', array( $this, 'migrate_error_notice' ) ); - } - } - } - } - - /** - * Provides one-time instructions for customer to reactivate the API Key if the migration fails. - * - * @since 2.0 - */ - public function migrate_error_notice() { ?> -
-

- plugin_or_theme == 'plugin' ) { - esc_html_e( 'Attempt to migrate data failed. Go to the Plugins screen then deactivate and reactive this plugin to reset the API Key data, then enter your API Key on the settings screen to receive software updates. Contact support if assistance is required.', $this->text_domain ); - } else { - esc_html_e( 'Attempt to migrate data failed. Switch themes, then switch back to this theme to reset the API Key data, then enter your API Key on the settings screen to receive software updates. Contact support if assistance is required.', $this->text_domain ); - } - ?> -

-
- $api_key, ); - if ( $activation_status == 'Activated' && $api_key != '' ) { - $this->deactivate( $args ); // reset API Key activation + if ( ! empty( $api_key ) && $activation_status == 'Activated' ) { + if ( empty( $this->deactivate( $args ) ) ) { + add_settings_error( 'not_deactivated_text', 'not_deactivated_error', esc_html__( 'The API Key could not be deactivated. Use the API Key Deactivation tab to manually deactivate the API Key before activating a new API Key. If all else fails, go to Plugins, then deactivate and reactivate this plugin, or if a theme change themes, then change back to this theme, then go to the Settings for this plugin/theme and enter the API Key information again to activate it. Also check the My Account dashboard to see if the API Key for this site was still active before the error message was displayed.', $this->text_domain ), 'updated' ); + } } } @@ -451,8 +391,6 @@ public function wc_am_api_key_text() { } // Returns the API Key status from the WooCommerce API Manager on the server public function wc_am_api_key_status() { - $license_status_check = ''; - if ( $this->get_api_key_status( true ) ) { $license_status_check = esc_html__( 'Activated', $this->text_domain ); update_option( $this->wc_am_activated_key, 'Activated' ); @@ -470,7 +408,9 @@ public function wc_am_api_key_status() { * @return array|mixed|object */ public function license_key_status() { - return json_decode( $this->status(), true ); + $status = $this->status(); + + return ! empty( $status ) ? json_decode( $this->status(), true ) : $status; } /** @@ -491,7 +431,7 @@ public function get_api_key_status( $live = false ) { if ( $live ) { $license_status = $this->license_key_status(); - return ! empty( $license_status[ 'data' ][ 'activated' ] ) && $license_status[ 'data' ][ 'activated' ]; + return ! empty( $license_status ) && ! empty( $license_status[ 'data' ][ 'activated' ] ) && $license_status[ 'data' ][ 'activated' ]; } /** @@ -563,9 +503,9 @@ public function validate_options( $input ) { if ( $activation_status == 'Deactivated' || $activation_status == '' || $api_key == '' || $checkbox_status == 'on' || $current_api_key != $api_key ) { /** * If this is a new key, and an existing key already exists in the database, - * deactivate the existing key before activating the new key. + * try to deactivate the existing key before activating the new key. */ - if ( $current_api_key != $api_key ) { + if ( ! empty( $current_api_key ) && $current_api_key != $api_key ) { $this->replace_license_key( $current_api_key ); } @@ -573,22 +513,28 @@ public function validate_options( $input ) { 'api_key' => $api_key, ); - $activate_results = json_decode( $this->activate( $args ), true ); + $activation_result = $this->activate( $args ); - if ( $activate_results[ 'success' ] === true && $activate_results[ 'activated' ] === true ) { - add_settings_error( 'activate_text', 'activate_msg', sprintf( __( '%s activated. ', $this->text_domain ), esc_attr( $this->software_title ) ) . esc_attr( "{$activate_results['message']}." ), 'updated' ); - update_option( $this->wc_am_activated_key, 'Activated' ); - update_option( $this->wc_am_deactivate_checkbox_key, 'off' ); - } + if ( ! empty( $activation_result ) ) { + $activate_results = json_decode( $activation_result, true ); - if ( $activate_results == false && ! empty( $this->data ) && ! empty( $this->wc_am_activated_key ) ) { - add_settings_error( 'api_key_check_text', 'api_key_check_error', esc_html__( 'Connection failed to the License Key API server. Try again later. There may be a problem on your server preventing outgoing requests, or the store is blocking your request to activate the plugin/theme.', $this->text_domain ), 'error' ); - update_option( $this->data[ $this->wc_am_activated_key ], 'Deactivated' ); - } + if ( $activate_results[ 'success' ] === true && $activate_results[ 'activated' ] === true ) { + add_settings_error( 'activate_text', 'activate_msg', sprintf( __( '%s activated. ', $this->text_domain ), esc_attr( $this->software_title ) ) . esc_attr( "{$activate_results['message']}." ), 'updated' ); + update_option( $this->wc_am_activated_key, 'Activated' ); + update_option( $this->wc_am_deactivate_checkbox_key, 'off' ); + } - if ( isset( $activate_results[ 'data' ][ 'error_code' ] ) && ! empty( $this->data ) && ! empty( $this->wc_am_activated_key ) ) { - add_settings_error( 'wc_am_client_error_text', 'wc_am_client_error', esc_attr( "{$activate_results['data']['error']}" ), 'error' ); - update_option( $this->data[ $this->wc_am_activated_key ], 'Deactivated' ); + if ( $activate_results == false && ! empty( $this->data ) && ! empty( $this->wc_am_activated_key ) ) { + add_settings_error( 'api_key_check_text', 'api_key_check_error', esc_html__( 'Connection failed to the License Key API server. Try again later. There may be a problem on your server preventing outgoing requests, or the store is blocking your request to activate the plugin/theme.', $this->text_domain ), 'error' ); + update_option( $this->wc_am_activated_key, 'Deactivated' ); + } + + if ( isset( $activate_results[ 'data' ][ 'error_code' ] ) && ! empty( $this->data ) && ! empty( $this->wc_am_activated_key ) ) { + add_settings_error( 'wc_am_client_error_text', 'wc_am_client_error', esc_attr( "{$activate_results['data']['error']}" ), 'error' ); + update_option( $this->wc_am_activated_key, 'Deactivated' ); + } + } else { + add_settings_error( 'not_activated_empty_response_text', 'not_activated_empty_response_error', esc_html__( 'The API Key activation could not be commpleted due to an unknown error possibly on the store server The activation results were empty.', $this->text_domain ), 'updated' ); } } // End Plugin Activation } @@ -605,52 +551,45 @@ public function wc_am_license_key_deactivation( $input ) { 'api_key' => $this->data[ $this->wc_am_api_key_key ], ); - if ( $options == 'on' && $activation_status == 'Activated' && $this->data[ $this->wc_am_api_key_key ] != '' ) { + if ( ! empty( $this->data[ $this->wc_am_api_key_key ] ) && $options == 'on' && $activation_status == 'Activated' ) { // deactivates API Key key activation - $activate_results = json_decode( $this->deactivate( $args ), true ); + $deactivation_result = $this->deactivate( $args ); - if ( $activate_results[ 'success' ] === true && $activate_results[ 'deactivated' ] === true ) { - if ( ! empty( $this->wc_am_activated_key ) ) { - update_option( $this->wc_am_activated_key, 'Deactivated' ); - add_settings_error( 'wc_am_deactivate_text', 'deactivate_msg', esc_html__( 'API Key deactivated. ', $this->text_domain ) . esc_attr( "{$activate_results['activations_remaining']}." ), 'updated' ); - } + if ( ! empty( $deactivation_result ) ) { + $activate_results = json_decode( $deactivation_result, true ); - return $options; - } + if ( $activate_results[ 'success' ] === true && $activate_results[ 'deactivated' ] === true ) { + if ( ! empty( $this->wc_am_activated_key ) ) { + update_option( $this->wc_am_activated_key, 'Deactivated' ); + add_settings_error( 'wc_am_deactivate_text', 'deactivate_msg', esc_html__( 'API Key deactivated. ', $this->text_domain ) . esc_attr( "{$activate_results['activations_remaining']}." ), 'updated' ); + } - if ( isset( $activate_results[ 'data' ][ 'error_code' ] ) && ! empty( $this->data ) && ! empty( $this->wc_am_activated_key ) ) { - add_settings_error( 'wc_am_client_error_text', 'wc_am_client_error', esc_attr( "{$activate_results['data']['error']}" ), 'error' ); - update_option( $this->data[ $this->wc_am_activated_key ], 'Deactivated' ); - } - } else { + return $options; + } - return $options; + if ( isset( $activate_results[ 'data' ][ 'error_code' ] ) && ! empty( $this->data ) && ! empty( $this->wc_am_activated_key ) ) { + add_settings_error( 'wc_am_client_error_text', 'wc_am_client_error', esc_attr( "{$activate_results['data']['error']}" ), 'error' ); + update_option( $this->wc_am_activated_key, 'Deactivated' ); + } + } else { + add_settings_error( 'not_deactivated_empty_response_text', 'not_deactivated_empty_response_error', esc_html__( 'The API Key activation could not be commpleted due to an unknown error possibly on the store server The activation results were empty.', $this->text_domain ), 'updated' ); + } } - return false; + return $options; } /** * Deactivate the current API Key before activating the new API Key * * @param string $current_api_key - * - * @return bool */ public function replace_license_key( $current_api_key ) { $args = array( 'api_key' => $current_api_key, ); - $reset = $this->deactivate( $args ); // reset API Key activation - - if ( $reset == true ) { - return true; - } - - add_settings_error( 'not_deactivated_text', 'not_deactivated_error', esc_html__( 'The API Key could not be deactivated. Use the API Key Deactivation tab to manually deactivate the API Key before activating a new API Key. If all else fails, go to Plugins, then deactivate and reactivate this plugin, or if a theme change themes, then change back to this theme, then go to the Settings for this plugin/theme and enter the API Key information again to activate it. Also check the My Account dashboard to see if the API Key for this site was still active before the error message was displayed.', $this->text_domain ), 'updated' ); - - return false; + $this->deactivate( $args ); } public function wc_am_deactivate_text() { } @@ -679,9 +618,15 @@ public function create_software_api_url( $args ) { * * @param array $args * - * @return bool|string + * @return string */ public function activate( $args ) { + if ( empty( $args ) ) { + add_settings_error( 'not_activated_text', 'not_activated_error', esc_html__( 'The API Key is missing from the deactivation request.', $this->text_domain ), 'updated' ); + + return ''; + } + $defaults = array( 'wc_am_action' => 'activate', 'product_id' => $this->product_id, @@ -696,12 +641,10 @@ public function activate( $args ) { if ( is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) != 200 ) { // Request failed - return false; + return ''; } - $response = wp_remote_retrieve_body( $request ); - - return $response; + return wp_remote_retrieve_body( $request ); } /** @@ -709,9 +652,15 @@ public function activate( $args ) { * * @param array $args * - * @return bool|string + * @return string */ public function deactivate( $args ) { + if ( empty( $args ) ) { + add_settings_error( 'not_deactivated_text', 'not_deactivated_error', esc_html__( 'The API Key is missing from the deactivation request.', $this->text_domain ), 'updated' ); + + return ''; + } + $defaults = array( 'wc_am_action' => 'deactivate', 'product_id' => $this->product_id, @@ -725,12 +674,10 @@ public function deactivate( $args ) { if ( is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) != 200 ) { // Request failed - return false; + return ''; } - $response = wp_remote_retrieve_body( $request ); - - return $response; + return wp_remote_retrieve_body( $request ); } /** @@ -739,6 +686,10 @@ public function deactivate( $args ) { * @return bool|string */ public function status() { + if ( empty( $this->data[ $this->wc_am_api_key_key ] ) ) { + return ''; + } + $defaults = array( 'wc_am_action' => 'status', 'api_key' => $this->data[ $this->wc_am_api_key_key ], @@ -752,12 +703,10 @@ public function status() { if ( is_wp_error( $request ) || wp_remote_retrieve_response_code( $request ) != 200 ) { // Request failed - return false; + return ''; } - $response = wp_remote_retrieve_body( $request ); - - return $response; + return wp_remote_retrieve_body( $request ); } /** @@ -850,7 +799,7 @@ public function update_check( $transient ) { 'plugin_name' => $this->plugin_name, 'version' => $this->wc_am_software_version, 'product_id' => $this->product_id, - 'api_key' => $this->data[ $this->wc_am_api_key_key ], + 'api_key' => ! empty( $this->data[ $this->wc_am_api_key_key ] ) ? $this->data[ $this->wc_am_api_key_key ] : '', 'instance' => $this->wc_am_instance_id, ); @@ -881,7 +830,7 @@ public function update_check( $transient ) { ); if ( isset( $new_ver ) && isset( $curr_ver ) ) { - if ( $response !== false && version_compare( $new_ver, $curr_ver, '>' ) ) { + if ( version_compare( $new_ver, $curr_ver, '>' ) ) { if ( $this->plugin_or_theme == 'plugin' ) { $transient->response[ $this->plugin_name ] = (object) $package; unset( $transient->no_update[ $this->plugin_name ] ); @@ -924,7 +873,7 @@ public function information_request( $result, $action, $args ) { 'plugin_name' => $this->plugin_name, 'version' => $this->wc_am_software_version, 'product_id' => $this->product_id, - 'api_key' => $this->data[ $this->wc_am_api_key_key ], + 'api_key' => ! empty( $this->data[ $this->wc_am_api_key_key ] ) ? $this->data[ $this->wc_am_api_key_key ] : '', 'instance' => $this->wc_am_instance_id, 'object' => $this->wc_am_domain, ); diff --git a/wc-api-manager-php-library.php b/wc-api-manager-php-library.php index a64c6cb..b865363 100644 --- a/wc-api-manager-php-library.php +++ b/wc-api-manager-php-library.php @@ -4,7 +4,7 @@ * Plugin Name: WooCommerce API Manager PHP Library for Plugins and Themes * Plugin URI: https://www.toddlahman.com/shop/woocommerce-api-manager-php-library-for-plugins-and-themes/ * Description: Drop the wc-am-client.php library into a plugin or theme, and use the example code below after line 26. - * Version: 2.7.2 + * Version: 2.7.3 * Author: Todd Lahman LLC * Author URI: https://www.toddlahman.com/ * License: Copyright Todd Lahman LLC @@ -29,7 +29,7 @@ */ // Load WC_AM_Client class if it exists. -if ( ! class_exists( 'WC_AM_Client_2_7_2' ) ) { +if ( ! class_exists( 'WC_AM_Client_2_7_3' ) ) { // Uncomment next line if this is a plugin require_once( plugin_dir_path( __FILE__ ) . 'wc-am-client.php' ); @@ -38,7 +38,7 @@ } // Instantiate WC_AM_Client class object if the WC_AM_Client class is loaded. -if ( class_exists( 'WC_AM_Client_2_7_2' ) ) { +if ( class_exists( 'WC_AM_Client_2_7_3' ) ) { /** * This file is only an example that includes a plugin header, and this code used to instantiate the client object. The variable $wcam_lib * can be used to access the public properties from the WC_AM_Client class, but $wcam_lib must have a unique name. To find data saved by @@ -61,13 +61,13 @@ * * Example: * - * $wcam_lib = new WC_AM_Client_2_7_2( $file, $product_id, $software_version, $plugin_or_theme, $api_url, $software_title ); + * $wcam_lib = new WC_AM_Client_2_7_3( $file, $product_id, $software_version, $plugin_or_theme, $api_url, $software_title ); */ // Example of empty string product_id. - //$wcam_lib = new WC_AM_Client_2_7_2( __FILE__, '', '1.0', 'plugin', 'http://wc/', 'Simple Comments - Simple' ); - //$wcam_lib = new WC_AM_Client_2_7_2( __FILE__, '', '1.0', 'plugin', 'http://wc/', 'WooCommerce API Manager PHP Library for Plugins and Themes' ); + //$wcam_lib = new WC_AM_Client_2_7_3( __FILE__, '', '1.0', 'plugin', 'http://wc/', ' ' ); + //$wcam_lib = new WC_AM_Client_2_7_3( __FILE__, '', '1.0', 'plugin', 'http://wc/', 'WooCommerce API Manager PHP Library for Plugins and Themes' ); // Preferred positive integer product_id. - $wcam_lib = new WC_AM_Client_2_7_2( __FILE__, 139932, '2.7.1', 'plugin', 'https://www.toddlahman.com/', 'WooCommerce API Manager PHP Library for Plugins and Themes' ); + $wcam_lib = new WC_AM_Client_2_7_3( __FILE__, 138828, '2.7.3', 'plugin', 'http://wc/', 'WooCommerce API Manager PHP Library for Plugins and Themes' ); } \ No newline at end of file