-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make migration failure instructions more detailed and specific to plu…
…gin or theme.
- Loading branch information
1 parent
2f7e1fa
commit 90db857
Showing
5 changed files
with
30 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
* @version 2.7.2 | ||
* @author Todd Lahman LLC https://www.toddlahman.com/ | ||
* @copyright Copyright (c) Todd Lahman LLC ([email protected]) | ||
* @package WooCommerce API Manager plugin and theme library | ||
|
@@ -17,8 +17,8 @@ | |
|
||
defined( 'ABSPATH' ) || exit; | ||
|
||
if ( ! class_exists( 'WC_AM_Client_2_7' ) ) { | ||
class WC_AM_Client_2_7 { | ||
if ( ! class_exists( 'WC_AM_Client_2_7_2' ) ) { | ||
class WC_AM_Client_2_7_2 { | ||
|
||
/** | ||
* Class args | ||
|
@@ -64,7 +64,7 @@ class WC_AM_Client_2_7 { | |
|
||
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->plugin_or_theme = esc_attr( $plugin_or_theme ); | ||
$this->plugin_or_theme = esc_attr( strtolower( $plugin_or_theme ) ); | ||
|
||
if ( $this->no_product_id ) { | ||
$this->identifier = $this->plugin_or_theme == 'plugin' ? dirname( untrailingslashit( plugin_basename( $file ) ) ) : get_stylesheet(); | ||
|
@@ -222,7 +222,13 @@ public function migrate_pre_2_0_data( $product_id, $software_title ) { | |
public function migrate_error_notice() { ?> | ||
<div class="notice notice-error"> | ||
<p> | ||
<?php esc_html_e( 'Attempt to migrate data failed. Deactivate then reactive this plugin or theme, then enter your API Key on the settings screen to receive software updates. Contact support if assistance is required.', $this->text_domain ); ?> | ||
<?php | ||
if ( $this->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 ); | ||
} | ||
?> | ||
</p> | ||
</div> | ||
<?php | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters