Skip to content

Commit

Permalink
Merge pull request #430 from pluginever/fix/426
Browse files Browse the repository at this point in the history
Fix/426
  • Loading branch information
kawsarahmedr authored Sep 1, 2024
2 parents a8ded39 + 7a56d13 commit 8e837d0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
16 changes: 16 additions & 0 deletions src/Admin/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public function __construct() {
add_filter( 'woocommerce_screen_ids', array( $this, 'screen_ids' ) );
add_filter( 'admin_footer_text', array( $this, 'admin_footer_text' ), PHP_INT_MAX );
add_filter( 'update_footer', array( $this, 'update_footer' ), PHP_INT_MAX );
add_filter( 'allowed_redirect_hosts', array( $this, 'allowed_redirect_hosts' ) );
}

/**
Expand Down Expand Up @@ -182,4 +183,19 @@ public static function view( $view, $args = array(), $path = '' ) {

include $file;
}

/**
* Allowed redirect hosts.
*
* @param array $hosts Allowed hosts.
*
* @since 1.0.0
* @return array
*/
public function allowed_redirect_hosts( $hosts ) {
$hosts[] = 'pluginever.com';
$hosts[] = 'www.pluginever.com';

return $hosts;
}
}
4 changes: 2 additions & 2 deletions src/Admin/Menus.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ public function go_pro_redirect() {
wp_verify_nonce( '_nonce' );
if ( isset( $_GET['page'] ) && 'go_wcsn_pro' === $_GET['page'] ) {
wp_safe_redirect( 'https://pluginever.com/plugins/woocommerce-serial-numbers-pro/?utm_source=admin-menu&utm_medium=link&utm_campaign=upgrade&utm_id=wc-serial-numbers' );
die;
exit;
}
}

Expand Down Expand Up @@ -337,7 +337,7 @@ public static function import_tab() {
<h3><?php esc_html_e( 'Available in Pro Version', 'wc-serial-numbers' ); ?></h3>
<a href="https://pluginever.com/plugins/woocommerce-serial-numbers-pro/?utm_source=import-tab&utm_medium=link&utm_campaign=upgrade&utm_id=wc-serial-numbers" target="_blank" class="button-primary"><?php esc_html_e( 'Upgrade to Pro Now', 'wc-serial-numbers' ); ?></a>
</div>
<img src="<?php echo esc_url( WCSN()->get_dir_url() . 'assets/images/csv-import.png' ); ?>" alt="<?php esc_attr_e( 'Import Serial Numbers', 'wc-serial-numbers' ); ?>"/>
<img src="<?php echo esc_url( WCSN()->get_assets_url() . 'images/csv-import.png' ); ?>" alt="<?php esc_attr_e( 'Import Serial Numbers', 'wc-serial-numbers' ); ?>"/>
</div>
<div class="wcsn-feature-promo-banner">
<div class="wcsn-feature-promo-banner__content">
Expand Down
4 changes: 2 additions & 2 deletions wc-serial-numbers.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
* Requires at least: 5.0
* Requires PHP: 7.4
* Author: PluginEver
* Author URI: http://pluginever.com
* Author URI: https://pluginever.com
* License: GPL v2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: wc-serial-numbers
* Domain Path: /languages
* Tested up to: 6.6
* WC requires at least: 5.0
* WC tested up to: 9.1
* WC tested up to: 9.2
*
* @package WooCommerceSerialNumbers
*
Expand Down

0 comments on commit 8e837d0

Please sign in to comment.